Skip to content

Commit

Permalink
Message
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 11, 2024
1 parent 3c91502 commit ba82dd5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rules/no-negation-in-equality-check.js
Expand Up @@ -12,7 +12,7 @@ const {
const MESSAGE_ID_ERROR = 'no-negation-in-equality-check/error';
const MESSAGE_ID_SUGGESTION = 'no-negation-in-equality-check/suggestion';
const messages = {
[MESSAGE_ID_ERROR]: 'Negated expression in not allowed here.',
[MESSAGE_ID_ERROR]: 'Negated expression in not allowed in equality check.',
[MESSAGE_ID_SUGGESTION]: 'Switch to \'{{operator}}\' check.',
};

Expand Down
24 changes: 12 additions & 12 deletions test/snapshots/no-negation-in-equality-check.mjs.md
Expand Up @@ -16,7 +16,7 @@ Generated by [AVA](https://avajs.dev).
`␊
> 1 | !foo === bar␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!==' check.␊
Expand All @@ -35,7 +35,7 @@ Generated by [AVA](https://avajs.dev).
`␊
> 1 | !foo !== bar␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '===' check.␊
Expand All @@ -54,7 +54,7 @@ Generated by [AVA](https://avajs.dev).
`␊
> 1 | !foo == bar␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!=' check.␊
Expand All @@ -73,7 +73,7 @@ Generated by [AVA](https://avajs.dev).
`␊
> 1 | !foo != bar␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '==' check.␊
Expand All @@ -95,7 +95,7 @@ Generated by [AVA](https://avajs.dev).
`␊
1 | function x() {␊
> 2 | return!foo === bar;␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
3 | }␊
--------------------------------------------------------------------------------␊
Expand Down Expand Up @@ -123,7 +123,7 @@ Generated by [AVA](https://avajs.dev).
`␊
1 | function x() {␊
> 2 | return!␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
3 | foo === bar;␊
4 | throw!␊
5 | foo === bar;␊
Expand All @@ -146,7 +146,7 @@ Generated by [AVA](https://avajs.dev).
2 | return!␊
3 | foo === bar;␊
> 4 | throw!␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
5 | foo === bar;␊
6 | }␊
Expand Down Expand Up @@ -174,7 +174,7 @@ Generated by [AVA](https://avajs.dev).
`␊
1 | foo␊
> 2 | !(a) === b␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!==' check.␊
Expand All @@ -196,7 +196,7 @@ Generated by [AVA](https://avajs.dev).
`␊
1 | foo␊
> 2 | ![a, b].join('') === c␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!==' check.␊
Expand All @@ -218,7 +218,7 @@ Generated by [AVA](https://avajs.dev).
`␊
1 | foo␊
> 2 | ! [a, b].join('') === c␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!==' check.␊
Expand All @@ -240,7 +240,7 @@ Generated by [AVA](https://avajs.dev).
`␊
1 | foo␊
> 2 | !/* comment */[a, b].join('') === c␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!==' check.␊
Expand All @@ -260,7 +260,7 @@ Generated by [AVA](https://avajs.dev).
`␊
> 1 | !!foo === bar␊
| ^ Negated expression in not allowed here.␊
| ^ Negated expression in not allowed in equality check.␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to '!==' check.␊
Expand Down
Binary file modified test/snapshots/no-negation-in-equality-check.mjs.snap
Binary file not shown.

0 comments on commit ba82dd5

Please sign in to comment.