Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Belco90 committed Feb 28, 2022
1 parent 2b9f076 commit 36edd13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-leaked-zero.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const isParenthesised = require('../util/ast').isParenthesised;
//------------------------------------------------------------------------------

const messages = {
noPotentialNumericEvaluation: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
noPotentialNumericEvaluation: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
};

const VALID_LEFT_SIDE_EXPRESSIONS = ['UnaryExpression', 'BinaryExpression', 'ConditionalExpression', 'CallExpression'];
Expand Down
24 changes: 12 additions & 12 deletions tests/lib/rules/jsx-no-leaked-zero.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'cast' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -122,7 +122,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'cast' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -140,7 +140,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'cast' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -158,7 +158,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'cast' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -176,7 +176,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'cast' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -194,7 +194,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'cast' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 23,
}],
Expand All @@ -213,7 +213,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
}
`,
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -230,7 +230,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
}
`,
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -247,7 +247,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
}
`,
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -264,7 +264,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
}
`,
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -281,7 +281,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
}
`,
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 22,
}],
Expand All @@ -299,7 +299,7 @@ ruleTester.run('jsx-no-leaked-zero', rule, {
`,
options: [{ fixStrategy: 'ternary' }],
errors: [{
message: 'Potential numeric evaluation that ends up in leaked zero to the DOM',
message: 'Potential numeric evaluation resulting in an unintentionally rendered `0`',
line: 3,
column: 23,
}],
Expand Down

0 comments on commit 36edd13

Please sign in to comment.