Skip to content

Commit 7993101

Browse files
plr108jugglinmike
authored andcommitted
[[FIX]] Fix "is is" message typos
Change messages containing a second, redundant "is"
1 parent 578575d commit 7993101

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

src/messages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var warnings = {
103103
W018: "Confusing use of '{a}'.",
104104
W019: "Use the isNaN function to compare with NaN.",
105105
W020: "Read only.",
106-
W021: "Reassignment of '{a}', which is is a {b}. " +
106+
W021: "Reassignment of '{a}', which is a {b}. " +
107107
"Use 'var' or 'let' to declare bindings that may change.",
108108
W022: "Do not assign to the exception parameter.",
109109
W023: null,

tests/regression/thirdparty.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ exports.prototype_1_7 = function (test) {
6565
.addError(260, 27, "'length' is already defined.")
6666
.addError(261, 17, "'key' is already defined.")
6767
.addError(261, 32, "'str' is already defined.")
68-
.addError(319, 5, "Reassignment of 'isArray', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
68+
.addError(319, 5, "Reassignment of 'isArray', which is a function. Use 'var' or 'let' to declare bindings that may change.")
6969
.addError(392, 6, "Missing semicolon.")
7070
.addError(400, 6, "Missing semicolon.")
7171
.addError(409, 6, "Missing semicolon.")
@@ -82,9 +82,9 @@ exports.prototype_1_7 = function (test) {
8282
.addError(2989, 24, "'tagName' used out of scope.")
8383
.addError(2989, 34, "'tagName' used out of scope.")
8484
.addError(2990, 17, "'tagName' used out of scope.")
85-
.addError(3827, 5, "Reassignment of 'getOffsetParent', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
86-
.addError(3844, 5, "Reassignment of 'positionedOffset', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
87-
.addError(3860, 5, "Reassignment of 'cumulativeOffset', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
85+
.addError(3827, 5, "Reassignment of 'getOffsetParent', which is a function. Use 'var' or 'let' to declare bindings that may change.")
86+
.addError(3844, 5, "Reassignment of 'positionedOffset', which is a function. Use 'var' or 'let' to declare bindings that may change.")
87+
.addError(3860, 5, "Reassignment of 'cumulativeOffset', which is a function. Use 'var' or 'let' to declare bindings that may change.")
8888
.addError(4036, 17, "'ret' is already defined.")
8989
.addError(4072, 60, "'cur' used out of scope.")
9090
.addError(4085, 23, "'i' is already defined.")
@@ -142,8 +142,8 @@ exports.lodash_0_6_1 = function (test) {
142142
.addError(168, 23, "If a strict mode function is executed using function invocation, its 'this' value will be undefined.")
143143
.addError(170, 26, "Missing '()' invoking a constructor.")
144144
.addError(632, 6, "Missing semicolon.")
145-
.addError(920, 5, "Reassignment of 'isArguments', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
146-
.addError(963, 5, "Reassignment of 'isFunction', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
145+
.addError(920, 5, "Reassignment of 'isArguments', which is a function. Use 'var' or 'let' to declare bindings that may change.")
146+
.addError(963, 5, "Reassignment of 'isFunction', which is a function. Use 'var' or 'let' to declare bindings that may change.")
147147
.addError(1122, 12, "'isArr' used out of scope.")
148148
.addError(1127, 13, "'className' used out of scope.")
149149
.addError(1153, 18, "'isArr' used out of scope.")

tests/unit/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,9 +2087,9 @@ exports["gh-2761"] = function (test) {
20872087
];
20882088

20892089
TestRun(test, "W021")
2090-
.addError(2, 1, "Reassignment of 'a', which is is a function. " +
2090+
.addError(2, 1, "Reassignment of 'a', which is a function. " +
20912091
"Use 'var' or 'let' to declare bindings that may change.")
2092-
.addError(6, 1, "Reassignment of 'a', which is is a function. " +
2092+
.addError(6, 1, "Reassignment of 'a', which is a function. " +
20932093
"Use 'var' or 'let' to declare bindings that may change.")
20942094
.test(code);
20952095

tests/unit/parser.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6094,12 +6094,12 @@ exports.classes = function (test) {
60946094
var run = TestRun(test)
60956095
.addError(cdecl + 4, 15, "Expected an identifier and instead saw 'package' (a reserved word).")
60966096
.addError(cexpr + 4, 15, "Expected an identifier and instead saw 'package' (a reserved word).")
6097-
.addError(cdeclAssn + 4, 21, "Reassignment of 'Foo15', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6098-
.addError(cdeclAssn + 7, 21, "Reassignment of 'Foo18', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6099-
.addError(cdeclAssn + 7, 43, "Reassignment of 'Foo17', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6100-
.addError(cexprAssn + 4, 27, "Reassignment of 'Foo15', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6101-
.addError(cexprAssn + 7, 27, "Reassignment of 'Foo18', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6102-
.addError(cexprAssn + 7, 49, "Reassignment of 'Foo17', which is is a class. Use 'var' or 'let' to declare bindings that may change.");
6097+
.addError(cdeclAssn + 4, 21, "Reassignment of 'Foo15', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6098+
.addError(cdeclAssn + 7, 21, "Reassignment of 'Foo18', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6099+
.addError(cdeclAssn + 7, 43, "Reassignment of 'Foo17', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6100+
.addError(cexprAssn + 4, 27, "Reassignment of 'Foo15', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6101+
.addError(cexprAssn + 7, 27, "Reassignment of 'Foo18', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6102+
.addError(cexprAssn + 7, 49, "Reassignment of 'Foo17', which is a class. Use 'var' or 'let' to declare bindings that may change.");
61036103

61046104
run.test(code, {esnext: true});
61056105
run.test(code, {moz: true});
@@ -6271,12 +6271,12 @@ exports.classExpression = function (test) {
62716271
];
62726272

62736273
TestRun(test)
6274-
.addError(2, 19, "Reassignment of 'MyClass', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6275-
.addError(3, 14, "Reassignment of 'MyClass', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6276-
.addError(4, 21, "Reassignment of 'MyClass', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6277-
.addError(5, 20, "Reassignment of 'MyClass', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6278-
.addError(6, 20, "Reassignment of 'MyClass', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6279-
.addError(7, 15, "Reassignment of 'MyClass', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
6274+
.addError(2, 19, "Reassignment of 'MyClass', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6275+
.addError(3, 14, "Reassignment of 'MyClass', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6276+
.addError(4, 21, "Reassignment of 'MyClass', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6277+
.addError(5, 20, "Reassignment of 'MyClass', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6278+
.addError(6, 20, "Reassignment of 'MyClass', which is a class. Use 'var' or 'let' to declare bindings that may change.")
6279+
.addError(7, 15, "Reassignment of 'MyClass', which is a class. Use 'var' or 'let' to declare bindings that may change.")
62806280
.addError(9, 6, "'MyClass' is not defined.")
62816281
.test(code, { esnext: true, undef: true });
62826282

@@ -6481,12 +6481,12 @@ exports.functionReassignment = function (test) {
64816481
];
64826482

64836483
TestRun(test)
6484-
.addError(2, 1, "Reassignment of 'f', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
6485-
.addError(3, 1, "Reassignment of 'f', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
6486-
.addError(5, 3, "Reassignment of 'g', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
6487-
.addError(6, 3, "Reassignment of 'g', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
6488-
.addError(9, 3, "Reassignment of 'h', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
6489-
.addError(10, 3, "Reassignment of 'h', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
6484+
.addError(2, 1, "Reassignment of 'f', which is a function. Use 'var' or 'let' to declare bindings that may change.")
6485+
.addError(3, 1, "Reassignment of 'f', which is a function. Use 'var' or 'let' to declare bindings that may change.")
6486+
.addError(5, 3, "Reassignment of 'g', which is a function. Use 'var' or 'let' to declare bindings that may change.")
6487+
.addError(6, 3, "Reassignment of 'g', which is a function. Use 'var' or 'let' to declare bindings that may change.")
6488+
.addError(9, 3, "Reassignment of 'h', which is a function. Use 'var' or 'let' to declare bindings that may change.")
6489+
.addError(10, 3, "Reassignment of 'h', which is a function. Use 'var' or 'let' to declare bindings that may change.")
64906490
.test(src);
64916491

64926492
test.done();

0 commit comments

Comments
 (0)