I am trying to install eslint and run it in code vs. I ran this command:
npm i -g eslint
and it seems to work, but I keep getting the error message "eslint" is not recognized as an internal or external command when trying to start eslint. What gives?
http://eslint.org/docs/user-guide/command-line-interface
http://eslint.org/docs/user-guide/getting-started
The module eslintmust not be installed in the global.
eslint
instead, you should install the module eslint-cliin global.
eslint-cli
, eslint-cli gloablly:
npm -g i eslint-cli
: eslint
npm i eslint --save-dev
: ( Windows)
eslint .\
, Windows eslint-cli , :
node node_modules\eslint\bin\eslint.js --init
.