Skip to content

Commit

Permalink
[[FIX]] Fix "is is" message typos
Browse files Browse the repository at this point in the history
Change messages containing a second, redundant "is"
  • Loading branch information
plr108 authored and jugglinmike committed Jun 24, 2018
1 parent 578575d commit 7993101
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var warnings = {
W018: "Confusing use of '{a}'.",
W019: "Use the isNaN function to compare with NaN.",
W020: "Read only.",
W021: "Reassignment of '{a}', which is is a {b}. " +
W021: "Reassignment of '{a}', which is a {b}. " +
"Use 'var' or 'let' to declare bindings that may change.",
W022: "Do not assign to the exception parameter.",
W023: null,
Expand Down
12 changes: 6 additions & 6 deletions tests/regression/thirdparty.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports.prototype_1_7 = function (test) {
.addError(260, 27, "'length' is already defined.")
.addError(261, 17, "'key' is already defined.")
.addError(261, 32, "'str' is already defined.")
.addError(319, 5, "Reassignment of 'isArray', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(319, 5, "Reassignment of 'isArray', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(392, 6, "Missing semicolon.")
.addError(400, 6, "Missing semicolon.")
.addError(409, 6, "Missing semicolon.")
Expand All @@ -82,9 +82,9 @@ exports.prototype_1_7 = function (test) {
.addError(2989, 24, "'tagName' used out of scope.")
.addError(2989, 34, "'tagName' used out of scope.")
.addError(2990, 17, "'tagName' used out of scope.")
.addError(3827, 5, "Reassignment of 'getOffsetParent', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3844, 5, "Reassignment of 'positionedOffset', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3860, 5, "Reassignment of 'cumulativeOffset', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3827, 5, "Reassignment of 'getOffsetParent', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3844, 5, "Reassignment of 'positionedOffset', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3860, 5, "Reassignment of 'cumulativeOffset', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(4036, 17, "'ret' is already defined.")
.addError(4072, 60, "'cur' used out of scope.")
.addError(4085, 23, "'i' is already defined.")
Expand Down Expand Up @@ -142,8 +142,8 @@ exports.lodash_0_6_1 = function (test) {
.addError(168, 23, "If a strict mode function is executed using function invocation, its 'this' value will be undefined.")
.addError(170, 26, "Missing '()' invoking a constructor.")
.addError(632, 6, "Missing semicolon.")
.addError(920, 5, "Reassignment of 'isArguments', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(963, 5, "Reassignment of 'isFunction', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(920, 5, "Reassignment of 'isArguments', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(963, 5, "Reassignment of 'isFunction', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(1122, 12, "'isArr' used out of scope.")
.addError(1127, 13, "'className' used out of scope.")
.addError(1153, 18, "'isArr' used out of scope.")
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2087,9 +2087,9 @@ exports["gh-2761"] = function (test) {
];

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

Expand Down
36 changes: 18 additions & 18 deletions tests/unit/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6094,12 +6094,12 @@ exports.classes = function (test) {
var run = TestRun(test)
.addError(cdecl + 4, 15, "Expected an identifier and instead saw 'package' (a reserved word).")
.addError(cexpr + 4, 15, "Expected an identifier and instead saw 'package' (a reserved word).")
.addError(cdeclAssn + 4, 21, "Reassignment of 'Foo15', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cdeclAssn + 7, 21, "Reassignment of 'Foo18', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cdeclAssn + 7, 43, "Reassignment of 'Foo17', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cexprAssn + 4, 27, "Reassignment of 'Foo15', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cexprAssn + 7, 27, "Reassignment of 'Foo18', which is is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cexprAssn + 7, 49, "Reassignment of 'Foo17', which is is a class. Use 'var' or 'let' to declare bindings that may change.");
.addError(cdeclAssn + 4, 21, "Reassignment of 'Foo15', which is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cdeclAssn + 7, 21, "Reassignment of 'Foo18', which is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cdeclAssn + 7, 43, "Reassignment of 'Foo17', which is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cexprAssn + 4, 27, "Reassignment of 'Foo15', which is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cexprAssn + 7, 27, "Reassignment of 'Foo18', which is a class. Use 'var' or 'let' to declare bindings that may change.")
.addError(cexprAssn + 7, 49, "Reassignment of 'Foo17', which is a class. Use 'var' or 'let' to declare bindings that may change.");

run.test(code, {esnext: true});
run.test(code, {moz: true});
Expand Down Expand Up @@ -6271,12 +6271,12 @@ exports.classExpression = function (test) {
];

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

Expand Down Expand Up @@ -6481,12 +6481,12 @@ exports.functionReassignment = function (test) {
];

TestRun(test)
.addError(2, 1, "Reassignment of 'f', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3, 1, "Reassignment of 'f', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(5, 3, "Reassignment of 'g', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(6, 3, "Reassignment of 'g', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(9, 3, "Reassignment of 'h', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(10, 3, "Reassignment of 'h', which is is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(2, 1, "Reassignment of 'f', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(3, 1, "Reassignment of 'f', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(5, 3, "Reassignment of 'g', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(6, 3, "Reassignment of 'g', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(9, 3, "Reassignment of 'h', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.addError(10, 3, "Reassignment of 'h', which is a function. Use 'var' or 'let' to declare bindings that may change.")
.test(src);

test.done();
Expand Down

0 comments on commit 7993101

Please sign in to comment.