Run syntax and style checker JSLint from a CLI.
To install jslint-cli, run:
git clone https://github.com/Koekelas/jslint-cli.git
cd jslint-cli/
npm i -g
To verify installation, run:
echo "const x = 42" | jslint-cli
This outputs:
1,13 Expected ';' and instead saw '(end)'.
jslint-cli is meant to be used with Flycheck. As a consequence, it only reads from standard input.
To lint a file, run:
jslint-cli < file.js
Delete ~/.jslint-cli/jslint.js
. jslint-cli will download JSLint on
next run.
Add this directory to your load path, then require flycheck-jslint
.