Reputation: 1548
I have globaly installed eslint using npm : npm install -g eslint
, then I setup a configuration file eslint --init
by answering the questions as follow :
? How would you like to configure ESLint? Use a popular style guide
? Which style guide do you want to follow? Airbnb
? Do you use React? No
? What format do you want your config file to be in? JavaScript
I tried to run eslint on my app.js file eslint app.js
It doesn't work
I tried to run it doing so : node_modules\.bin\eslint app.js
but Ican't eslint file under \node_modules.bin
5.6.0
8.10.0
Upvotes: 1
Views: 3402
Reputation: 5838
Seeing the error you have just mentioned after trying:
eslint --debug app.js
You need to globally install the eslint plugin import and the eslint airbnb config plugin.
npm -g install eslint-plugin-import eslint-config-airbnb-base
You need to install said plugin because in the eslint --init
configuration you have selected the Airbnb style guide.
Upvotes: 1