I Wanted to use ESLint to make my code better. I have installed it using the comand :
$ npm install -g eslint
later I ran the following command to generate a config file . A file '.eslintrc.json' is created in my project's root directory
$ eslint --init
later i ran the following command :
$ eslint yourfile.js
but it didn't output any result.
later I have installed airbnb .
npm info "eslint-config-airbnb@latest" peerDependencies
also executed :
(
export PKG=eslint-config-airbnb;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
this created a folder 'eslint-config-airbnb' in /usr/lib/node_modules .
in '.eslintrc.json' file I placed "extends": "airbnb" .
then ran the command 'eslint filename.js'. It still doesn't output anything.Where did I go wrong ? Why am I unable to get the result ?
output screen shot : eslint output
config file screen shot :.eslintrc.json