MDIT
MDIT

Reputation: 1548

eslint missing under \node_modules\.bin

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.jsIt 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

Upvotes: 1

Views: 3402

Answers (1)

Dez
Dez

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

Related Questions