The eslint
module must not be installed into global.
instead, you should install eslint-cli
module into global.
So, first install eslint-cli gloablly:
npm -g i eslint-cli
then in the project folder: install eslint locally
npm i eslint --save-dev
Then in the project folder you can run someting like: (on Windows)
eslint .
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…