Repository: jshint/jshint
Pull request #3462 (2020-04-06 17:07:14)

[[DOCS]] Improve message for warning W067
The message "Bad invocation" is overly vague, forcing users to guess
about its intent and its status as a recommendation. Reword the message
to more specifically describe the concern: that the pattern is uncommon.


Patch:
diff --git a/.gitignore b/.gitignore
index b0b6a5c9..64b826c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,3 @@ demo.js
 .idea
 
 coverage/
-
-# The following directory is created when validating the project website using
-# the command `npm run test-website`
-tests/jshint.com/
diff --git a/.travis.yml b/.travis.yml
index a3e4900a..65b434bf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,7 +30,5 @@ matrix:
       env: CMD=test-262
     - node_js: 10
       env: CMD=test-browser
-    - node_js: 10
-      env: CMD=test-website
   fast_finish: true
 sudo: false
diff --git a/README.md b/README.md
index fb4dbc74..a92038a7 100644
--- a/README.md
+++ b/README.md
@@ -15,8 +15,8 @@
 
 JSHint is a community-driven tool that detects errors and potential problems in
 JavaScript code. Since JSHint is so flexible, you can easily adjust it in 
-the environment you expect your code to execute. JSHint is publicly available
-and will always stay this way.
+the environment you expect your code to execute. JSHint is open source and
+will always stay this way.
 
 ## Our goal
 
diff --git a/docs/cli.md b/docs/cli.md
index acaa63aa..ccb83eee 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -1,7 +1,7 @@
 # Command-line Interface
 
-The JSHint CLI can be installed via npm (see [the Installation
-page](https://jshint.com/install/) for instructions).
+The JSHint CLI can be installed via npm (see [the Installation page](/install)
+for instructions).
 
 Contents: [Specifying Input](#specifying-input) · [Specifying Linting
 Options](#specifying-linting-options) · [Special Options](#special-options) ·
@@ -45,9 +45,9 @@ If a file path is a dash (`-`) then JSHint will read from standard input.
 
 ### Specifying Linting Options
 
-The `jshint` executable is capable of applying [linting
-options](https://jshint.com/docs/options) specified in an external
-[JSON](http://json.org/)-formatted file. Such a file might look like this:
+The `jshint` executable is capable of applying [linting options](/docs/options)
+specified in an external [JSON](http://json.org/)-formatted file. Such a file
+might look like this:
 
     {
       "curly": true,
@@ -71,8 +71,7 @@ If this search yields no results, `jshint` will lint the input code as if no
 linting rules had been enabled.
 
 The command-line interface offers some [special options](#special-options) in
-addition to [the ones available in other
-contexts](https://jshint.com/docs/options)
+addition to [the ones available in other contexts](/docs/options)
 
 <a name="special-options"></a>
 
@@ -89,7 +88,7 @@ the current file.
 
 For example, you might define a `.jshintrc` file in the top-level directory of
 your project (say, `./.jshintrc') to specify the [linting
-options](https://jshint.com/docs/options) you would like to use in your entire project:
+options](/docs/options) you would like to use in your entire project:
 
     {
       "undef": true,
@@ -117,9 +116,8 @@ Specify options that should only be applied to files matching a given path
 pattern.
 
 The following configuration file [disallows variable
-shadowing](https://jshint.com/docs/options#shadow) for *all* files and [allows
-expressions as statements](https://jshint.com/docs/options#expr) for only those
-files ending in `-test.js`:
+shadowing](/docs/options#shadow) for *all* files and [allows expressions as
+statements](/docs/options#expr) for only those files ending in `-test.js`:
 
     {
       "shadow": false,
@@ -184,8 +182,7 @@ CheckStyle XML.
       </file>
     </checkstyle>
 
-See also: [Writing your own JSHint
-reporter](https://jshint.com/docs/reporters/).
+See also: [Writing your own JSHint reporter](/docs/reporters/).
 
 #### `--verbose`
 
diff --git a/package.json b/package.json
index d7c0baa2..83279570 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,6 @@
     "test-node": "npm run test-unit && npm run test-cli && npm run test-regression",
     "test-regression": "nodeunit tests/regression",
     "test-unit": "nodeunit tests/unit tests/unit/unstable",
-    "test-website": "node tests/website.js",
     "test": "npm run test-node && npm run test-browser"
   },
   "main": "./src/jshint.js",
diff --git a/src/messages.js b/src/messages.js
index bd3959ae..cce95ff7 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -155,7 +155,7 @@ var warnings = {
   W064: "Missing 'new' prefix when invoking a constructor.",
   W065: "Missing radix parameter.",
   W066: "Implied eval. Consider passing a function instead of a string.",
-  W067: "Bad invocation.",
+  W067: "Unorthodox function invocation.",
   W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
   W069: "['{a}'] is better written in dot notation.",
   W070: "Extra comma. (it breaks older versions of IE)",


Test patch:
diff --git a/tests/unit/parser.js b/tests/unit/parser.js
index 91a03730..7d075e19 100644
--- a/tests/unit/parser.js
+++ b/tests/unit/parser.js
@@ -8591,7 +8591,7 @@ exports.testStrictDirectiveASI = function (test) {
     .test("'use strict';function fn() {} fn();", options);
 
   TestRun(test, 4)
-    .addError(2, 1, "Bad invocation.")
+    .addError(2, 1, "Unorthodox function invocation.")
     .addError(2, 21, "Missing \"use strict\" statement.")
     .test("'use strict'\n(function fn() {})();", options);
 
diff --git a/tests/website.js b/tests/website.js
deleted file mode 100644
index 68c95b1e..00000000
--- a/tests/website.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * The jshint.com project website generates some content based on the state of
- * this repository. Changes in this repository could therefore interfere with
- * the website. This script verifies that when the website is configured to use
- * the current codebase, it builds successfully and passes its own test suite.
- */
-"use strict";
-
-var execSync = require("child_process").execSync;
-var path = require("path");
-var fs = require("fs");
-
-var repository = "https://github.com/jshint/jshint.github.io.git";
-var websiteDir = path.join(__dirname, "jshint.com");
-var linkName = path.join(websiteDir, "res", "jshint");
-
-function execInSite(command) {
-  execSync(command, { stdio: "inherit", cwd: websiteDir });
-}
-
-fs.mkdirSync(websiteDir, {recursive: true});
-
-execInSite("git init");
-execInSite("git pull " + repository + " dev");
-execInSite("git rm -rf --ignore-unmatch res/jshint");
-
-try {
-  fs.unlinkSync(linkName);
-} catch (error) {}
-
-fs.symlinkSync(path.join(__dirname, ".."), linkName);
-
-execInSite("npm install");
-execInSite("npm test");