Skip to content

Commit 331b306

Browse files
authored
no-array-method-this-argument: Fix suggestion message (#2263)
1 parent 797caee commit 331b306

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

rules/no-array-method-this-argument.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SUGGESTION_REMOVE = 'suggestion-remove';
1414
const messages = {
1515
[ERROR_PROTOTYPE_METHOD]: 'Do not use the `this` argument in `Array#{{method}}()`.',
1616
[ERROR_STATIC_METHOD]: 'Do not use the `this` argument in `Array.{{method}}()`.',
17-
[SUGGESTION_REMOVE]: 'Remove the second argument.',
17+
[SUGGESTION_REMOVE]: 'Remove this argument.',
1818
[SUGGESTION_BIND]: 'Use a bound function.',
1919
};
2020

test/snapshots/no-array-method-this-argument.mjs.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Generated by [AVA](https://avajs.dev).
292292
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
293293
294294
--------------------------------------------------------------------------------␊
295-
Suggestion 1/1: Remove the second argument.␊
295+
Suggestion 1/1: Remove this argument.␊
296296
1 | array.map(() => {})␊
297297
`
298298

@@ -311,7 +311,7 @@ Generated by [AVA](https://avajs.dev).
311311
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
312312
313313
--------------------------------------------------------------------------------␊
314-
Suggestion 1/1: Remove the second argument.␊
314+
Suggestion 1/1: Remove this argument.␊
315315
1 | Array.from(iterableOrArrayLike, () => {})␊
316316
`
317317

@@ -330,7 +330,7 @@ Generated by [AVA](https://avajs.dev).
330330
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
331331
332332
--------------------------------------------------------------------------------␊
333-
Suggestion 1/2: Remove the second argument.␊
333+
Suggestion 1/2: Remove this argument.␊
334334
1 | array.map(callback)␊
335335
336336
--------------------------------------------------------------------------------␊
@@ -353,7 +353,7 @@ Generated by [AVA](https://avajs.dev).
353353
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
354354
355355
--------------------------------------------------------------------------------␊
356-
Suggestion 1/2: Remove the second argument.␊
356+
Suggestion 1/2: Remove this argument.␊
357357
1 | Array.from(iterableOrArrayLike, callback)␊
358358
359359
--------------------------------------------------------------------------------␊
@@ -376,7 +376,7 @@ Generated by [AVA](https://avajs.dev).
376376
| ^^^^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
377377
378378
--------------------------------------------------------------------------------␊
379-
Suggestion 1/2: Remove the second argument.␊
379+
Suggestion 1/2: Remove this argument.␊
380380
1 | array.map(callback)␊
381381
382382
--------------------------------------------------------------------------------␊
@@ -399,7 +399,7 @@ Generated by [AVA](https://avajs.dev).
399399
| ^^^^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
400400
401401
--------------------------------------------------------------------------------␊
402-
Suggestion 1/2: Remove the second argument.␊
402+
Suggestion 1/2: Remove this argument.␊
403403
1 | Array.from(iterableOrArrayLike, callback)␊
404404
405405
--------------------------------------------------------------------------------␊
@@ -422,7 +422,7 @@ Generated by [AVA](https://avajs.dev).
422422
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
423423
424424
--------------------------------------------------------------------------------␊
425-
Suggestion 1/2: Remove the second argument.␊
425+
Suggestion 1/2: Remove this argument.␊
426426
1 | array.map(function () {})␊
427427
428428
--------------------------------------------------------------------------------␊
@@ -445,7 +445,7 @@ Generated by [AVA](https://avajs.dev).
445445
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
446446
447447
--------------------------------------------------------------------------------␊
448-
Suggestion 1/2: Remove the second argument.␊
448+
Suggestion 1/2: Remove this argument.␊
449449
1 | Array.from(iterableOrArrayLike, function () {})␊
450450
451451
--------------------------------------------------------------------------------␊
@@ -468,7 +468,7 @@ Generated by [AVA](https://avajs.dev).
468468
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
469469
470470
--------------------------------------------------------------------------------␊
471-
Suggestion 1/2: Remove the second argument.␊
471+
Suggestion 1/2: Remove this argument.␊
472472
1 | array.map(function callback () {})␊
473473
474474
--------------------------------------------------------------------------------␊
@@ -491,7 +491,7 @@ Generated by [AVA](https://avajs.dev).
491491
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
492492
493493
--------------------------------------------------------------------------------␊
494-
Suggestion 1/2: Remove the second argument.␊
494+
Suggestion 1/2: Remove this argument.␊
495495
1 | Array.from(iterableOrArrayLike, function callback () {})␊
496496
497497
--------------------------------------------------------------------------------␊
@@ -514,7 +514,7 @@ Generated by [AVA](https://avajs.dev).
514514
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
515515
516516
--------------------------------------------------------------------------------␊
517-
Suggestion 1/2: Remove the second argument.␊
517+
Suggestion 1/2: Remove this argument.␊
518518
1 | array.map( foo as bar,)␊
519519
520520
--------------------------------------------------------------------------------␊
@@ -537,7 +537,7 @@ Generated by [AVA](https://avajs.dev).
537537
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
538538
539539
--------------------------------------------------------------------------------␊
540-
Suggestion 1/2: Remove the second argument.␊
540+
Suggestion 1/2: Remove this argument.␊
541541
1 | Array.from(iterableOrArrayLike, foo as bar,)␊
542542
543543
--------------------------------------------------------------------------------␊
@@ -560,7 +560,7 @@ Generated by [AVA](https://avajs.dev).
560560
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
561561
562562
--------------------------------------------------------------------------------␊
563-
Suggestion 1/2: Remove the second argument.␊
563+
Suggestion 1/2: Remove this argument.␊
564564
1 | array.map( (( foo as bar )),)␊
565565
566566
--------------------------------------------------------------------------------␊
@@ -583,7 +583,7 @@ Generated by [AVA](https://avajs.dev).
583583
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
584584
585585
--------------------------------------------------------------------------------␊
586-
Suggestion 1/2: Remove the second argument.␊
586+
Suggestion 1/2: Remove this argument.␊
587587
1 | Array.from(iterableOrArrayLike, (( foo as bar )),)␊
588588
589589
--------------------------------------------------------------------------------␊
@@ -606,7 +606,7 @@ Generated by [AVA](https://avajs.dev).
606606
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
607607
608608
--------------------------------------------------------------------------------␊
609-
Suggestion 1/2: Remove the second argument.␊
609+
Suggestion 1/2: Remove this argument.␊
610610
1 | array.map( (( 0, callback )),)␊
611611
612612
--------------------------------------------------------------------------------␊
@@ -629,7 +629,7 @@ Generated by [AVA](https://avajs.dev).
629629
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
630630
631631
--------------------------------------------------------------------------------␊
632-
Suggestion 1/2: Remove the second argument.␊
632+
Suggestion 1/2: Remove this argument.␊
633633
1 | Array.from(iterableOrArrayLike, (( 0, callback )),)␊
634634
635635
--------------------------------------------------------------------------------␊
@@ -652,7 +652,7 @@ Generated by [AVA](https://avajs.dev).
652652
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
653653
654654
--------------------------------------------------------------------------------␊
655-
Suggestion 1/2: Remove the second argument.␊
655+
Suggestion 1/2: Remove this argument.␊
656656
1 | array.map((0, () => {}))␊
657657
658658
--------------------------------------------------------------------------------␊
@@ -675,7 +675,7 @@ Generated by [AVA](https://avajs.dev).
675675
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
676676
677677
--------------------------------------------------------------------------------␊
678-
Suggestion 1/2: Remove the second argument.␊
678+
Suggestion 1/2: Remove this argument.␊
679679
1 | Array.from(iterableOrArrayLike, (0, () => {}))␊
680680
681681
--------------------------------------------------------------------------------␊
@@ -698,7 +698,7 @@ Generated by [AVA](https://avajs.dev).
698698
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array#map()\`.␊
699699
700700
--------------------------------------------------------------------------------␊
701-
Suggestion 1/2: Remove the second argument.␊
701+
Suggestion 1/2: Remove this argument.␊
702702
1 | array.map(callback.bind(foo))␊
703703
704704
--------------------------------------------------------------------------------␊
@@ -721,7 +721,7 @@ Generated by [AVA](https://avajs.dev).
721721
| ^^^^^^^^^^^^ Do not use the \`this\` argument in \`Array.from()\`.␊
722722
723723
--------------------------------------------------------------------------------␊
724-
Suggestion 1/2: Remove the second argument.␊
724+
Suggestion 1/2: Remove this argument.␊
725725
1 | Array.from(iterableOrArrayLike, callback.bind(foo))␊
726726
727727
--------------------------------------------------------------------------------␊
-8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)