Repository: jshint/jshint
Pull request #3287 (2018-06-10 22:32:46)

[[FIX]] Remove warning W100
No justification could be found for this warning. See https://github.com/jshint/jshint/issues/2741

This should resolve gh-2741.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/17416591/badge)](https://coveralls.io/builds/17416591)

Coverage decreased (-0.002%) to 98.753% when pulling **c4d9257bea2320fe42e7d8d2f9646d2d21291fcb on jugglinmike:remove-w100** into **578575d0af7b71dc3e6071ac31915b8d28f989c5 on jshint:master**.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/17416591/badge)](https://coveralls.io/builds/17416591)

Coverage decreased (-0.002%) to 98.753% when pulling **c4d9257bea2320fe42e7d8d2f9646d2d21291fcb on jugglinmike:remove-w100** into **578575d0af7b71dc3e6071ac31915b8d28f989c5 on jshint:master**.


Patch:
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index d1b00903..2f4396c5 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -55,12 +55,13 @@ further defined and clarified by project maintainers.
 ## Enforcement
 
 Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at waldron.rick@gmail.com,
-caitpotter88@gmail.com, or mike@mikepennisi.com. All complaints will be
-reviewed and investigated and will result in a response that is deemed
-necessary and appropriate to the circumstances. The project team is obligated
-to maintain confidentiality with regard to the reporter of an incident. Further
-details of specific enforcement policies may be posted separately.
+reported by contacting the project team at admin@jshint.org (or any of the
+members individually: waldron.rick@gmail.com, caitpotter88@gmail.com, and
+mike@mikepennisi.com). All complaints will be reviewed and investigated and
+will result in a response that is deemed necessary and appropriate to the
+circumstances. The project team is obligated to maintain confidentiality with
+regard to the reporter of an incident. Further details of specific enforcement
+policies may be posted separately.
 
 Project maintainers who do not follow or enforce the Code of Conduct in good
 faith may face temporary or permanent repercussions as determined by other
diff --git a/README.md b/README.md
index 9aa41576..6a9069f2 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ reasons. This license is included as an in-line within the file it concerns.
 JSHint is currently maintained by [Rick Waldron](https://github.com/rwaldron/),
 [Caitlin Potter](https://github.com/caitp/), [Mike
 Pennisi](https://github.com/jugglinmike/), and [Luke
-Page](https://github.com/lukeapage).
+Page](https://github.com/lukeapage). You can reach them via admin@jshint.org.
 
 ## Previous Maintainers
 
diff --git a/package.json b/package.json
index 00b38336..018eb518 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
     "console-browserify": "1.1.x",
     "exit": "0.1.x",
     "htmlparser2": "3.8.x",
-    "lodash": "3.7.x",
+    "lodash": "~4.17.10",
     "minimatch": "~3.0.2",
     "shelljs": "0.3.x",
     "strip-json-comments": "1.0.x",
diff --git a/src/lex.js b/src/lex.js
index 3481948a..2d361de6 100644
--- a/src/lex.js
+++ b/src/lex.js
@@ -1516,13 +1516,6 @@ Lexer.prototype = {
       this.input.search(/(\u00A0)/) : -1;
   },
 
-  /*
-   * Scan for characters that get silently deleted by one or more browsers.
-   */
-  scanUnsafeChars: function() {
-    return this.input.search(reg.unsafeChars);
-  },
-
   /*
    * Produce the next raw token or return 'null' if no tokens can be matched.
    * This method skips over all space characters.
@@ -1615,16 +1608,6 @@ Lexer.prototype = {
     }
 
     this.input = this.input.replace(/\t/g, state.tab);
-    char = this.scanUnsafeChars();
-
-    if (char >= 0) {
-      this.triggerAsync(
-        "warning",
-        { code: "W100", line: this.line, character: char },
-        checks,
-        function() { return true; }
-      );
-    }
 
     // If there is a limit on line length, warn when lines get too
     // long.
diff --git a/src/messages.js b/src/messages.js
index 28bd41b9..f9bc3b5f 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -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,
@@ -188,7 +188,7 @@ var warnings = {
   W097: "Use the function form of \"use strict\".",
   W098: "'{a}' is defined but never used.",
   W099: null,
-  W100: "This character may get silently deleted by one or more browsers.",
+  W100: null,
   W101: "Line is too long.",
   W102: null,
   W103: "The '{a}' property is deprecated.",
diff --git a/src/reg.js b/src/reg.js
index 9fc9bb65..b830776b 100644
--- a/src/reg.js
+++ b/src/reg.js
@@ -10,10 +10,6 @@
 exports.unsafeString =
   /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
 
-// Unsafe characters that are silently deleted by one or more browsers (cx)
-exports.unsafeChars =
-  /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
-
 // Characters in strings that need escaping (nx and nxg)
 exports.needEsc =
   /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;


Test patch:
diff --git a/tests/regression/thirdparty.js b/tests/regression/thirdparty.js
index 2571d0a8..30dd7292 100644
--- a/tests/regression/thirdparty.js
+++ b/tests/regression/thirdparty.js
@@ -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.")
@@ -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.")
@@ -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.")
diff --git a/tests/unit/core.js b/tests/unit/core.js
index a3a09ee3..3effcb29 100644
--- a/tests/unit/core.js
+++ b/tests/unit/core.js
@@ -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);
 
diff --git a/tests/unit/parser.js b/tests/unit/parser.js
index b914b8f2..b553e1d9 100644
--- a/tests/unit/parser.js
+++ b/tests/unit/parser.js
@@ -9,13 +9,16 @@ var fs    = require('fs');
 var TestRun = require("../helpers/testhelper").setup.testRun;
 var path    = require("path");
 
+/**
+ * The warning for this input was intentionally disabled after research into
+ * its justification produced no results.
+ */
 exports.unsafe = function (test) {
   var code = [
     "var a\u000a = 'Here is a unsafe character';",
   ];
 
   TestRun(test)
-    .addError(1, 5, "This character may get silently deleted by one or more browsers.")
     .test(code, {es3: true});
 
   test.done();
@@ -26,36 +29,30 @@ exports.peekOverDirectives = function (test) {
 
   TestRun(test)
     // Within object literal
-    .addError(18, 15, "This character may get silently deleted by one or more browsers.")
     .addError(18, 14, "Unexpected control character in regular expression.")
     .addError(19, 14, "Unexpected escaped character '<' in regular expression.")
     .addError(20, 81, "Line is too long.")
     .addError(21, 15, "Control character in string: <non-printable>.")
-    .addError(21, 14, "This character may get silently deleted by one or more browsers.")
     .addError(22, 14, "'Octal integer literal' is only available in ES6 (use 'esversion: 6').")
     .addError(23, 14, "'Binary integer literal' is only available in ES6 (use 'esversion: 6').")
     .addError(24, 14, "'template literal syntax' is only available in ES6 (use 'esversion: 6').")
     .addError(25, 14, "'Sticky RegExp flag' is only available in ES6 (use 'esversion: 6').")
 
     // Within array literal:
-    .addError(44, 4, "This character may get silently deleted by one or more browsers.")
     .addError(44, 3, "Unexpected control character in regular expression.")
     .addError(45, 3, "Unexpected escaped character '<' in regular expression.")
     .addError(46, 81, "Line is too long.")
     .addError(47, 4, "Control character in string: <non-printable>.")
-    .addError(47, 3, "This character may get silently deleted by one or more browsers.")
     .addError(48, 3, "'Octal integer literal' is only available in ES6 (use 'esversion: 6').")
     .addError(49, 3, "'Binary integer literal' is only available in ES6 (use 'esversion: 6').")
     .addError(50, 3, "'template literal syntax' is only available in ES6 (use 'esversion: 6').")
     .addError(51, 3, "'Sticky RegExp flag' is only available in ES6 (use 'esversion: 6').")
 
     // Within grouping operator:
-    .addError(70, 4, "This character may get silently deleted by one or more browsers.")
     .addError(70, 3, "Unexpected control character in regular expression.")
     .addError(71, 3, "Unexpected escaped character '<' in regular expression.")
     .addError(72, 81, "Line is too long.")
     .addError(73, 4, "Control character in string: <non-printable>.")
-    .addError(73, 3, "This character may get silently deleted by one or more browsers.")
     .addError(74, 3, "'Octal integer literal' is only available in ES6 (use 'esversion: 6').")
     .addError(75, 3, "'Binary integer literal' is only available in ES6 (use 'esversion: 6').")
     .addError(76, 3, "'template literal syntax' is only available in ES6 (use 'esversion: 6').")
@@ -574,9 +571,7 @@ exports.regexp = function (test) {
   ];
 
   var run = TestRun(test)
-    .addError(1, 11, "This character may get silently deleted by one or more browsers.")
     .addError(1, 10, "Unexpected control character in regular expression.")
-    .addError(2, 12, "This character may get silently deleted by one or more browsers.")
     .addError(2, 10, "Unexpected control character in regular expression.")
     .addError(3, 10, "Unexpected escaped character '<' in regular expression.")
     .addError(4, 10, "Unexpected escaped character '<' in regular expression.")
@@ -723,7 +718,6 @@ exports.strings = function (test) {
 
   var run = TestRun(test)
     .addError(1, 10, "Control character in string: <non-printable>.")
-    .addError(1, 9, "This character may get silently deleted by one or more browsers.")
     .addError(7, 12, "Unclosed string.")
     .addError(7, 12, "Missing semicolon.");
   run.test(code, {es3: true});
@@ -6094,12 +6088,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});
@@ -6271,12 +6265,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 });
 
@@ -6481,12 +6475,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();