From ba82dd574820eb0092935d88be24ff82235be51d Mon Sep 17 00:00:00 2001 From: fisker Date: Sat, 11 May 2024 10:53:24 +0800 Subject: [PATCH] Message --- rules/no-negation-in-equality-check.js | 2 +- .../no-negation-in-equality-check.mjs.md | 24 +++++++++--------- .../no-negation-in-equality-check.mjs.snap | Bin 791 -> 799 bytes 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rules/no-negation-in-equality-check.js b/rules/no-negation-in-equality-check.js index 1df0b4748f..9bcdbb8115 100644 --- a/rules/no-negation-in-equality-check.js +++ b/rules/no-negation-in-equality-check.js @@ -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.', }; diff --git a/test/snapshots/no-negation-in-equality-check.mjs.md b/test/snapshots/no-negation-in-equality-check.mjs.md index e58ab98746..6888103721 100644 --- a/test/snapshots/no-negation-in-equality-check.mjs.md +++ b/test/snapshots/no-negation-in-equality-check.mjs.md @@ -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.␊ @@ -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.␊ @@ -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.␊ @@ -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.␊ @@ -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 | }␊ ␊ --------------------------------------------------------------------------------␊ @@ -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;␊ @@ -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 | }␊ ␊ @@ -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.␊ @@ -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.␊ @@ -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.␊ @@ -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.␊ @@ -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.␊ diff --git a/test/snapshots/no-negation-in-equality-check.mjs.snap b/test/snapshots/no-negation-in-equality-check.mjs.snap index 9a4ac0b398cd61207073f13f2ab6de70760145ed..9df853b5dd8c5053062066810663133c557a2e25 100644 GIT binary patch literal 799 zcmV+)1K|8YRzV7zJB;7hCv|JseR#>Q^}G!uOog5yJogrtktD;{%=I9^lE)!LDl(8%!H) zLP57IGR8gcBYri~Et9?hV}OmrilW>*=cVkA4i2zOz3pq&S{wGqCN%~?2^5j071_q~ z`n@_3SH8LDIK=Tn1(EAaWRyWP9<+6u<&2Yi!#ZJmQCIm`zE%CO{Q;CZ9{)#8?(%lk_vCZ!F1%<;f}cr z$D;5LIpKHM-drvPpbk?gNKz^QTQG%V37)5UjpI|v%aeDKl6&+DFk2ZRvIG9>j-Q}t z_&SIxDnj35&|9(4ful|b4jD(Dg`Du-cY@0~0jF_-f7U`FLapIFoNucDG-Y3D#k%GT z=bDeHTyu_2$zII=>@X;C<@sh)Gr(FHvd(~g=74>O0hY!&oycJVrkRm0C$AL0tU1!A z6sd$)y;^4tlK7TdWa4D4%7cW)Bl-%7rM_YFNtZFip9AghRCADu_%cwq$juqhHeJE@drg`;^>LNi6;6(O5gX)@)-T~?coqLOD(w>g$q*h}VF d!>CgZ)sMw%=E_W?B!i+r=|7(B?|l6e0050%gNXnD literal 791 zcmV+y1L*ugRzVy$A)y)c;W@Wz5%hKYEp z(x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