I've done the followings to use eslint globally so not repeat on every new project but I am not able to get the eslint plugin part to work. what step am I missing:
- installed eslint (& the eslint-plugin-promise ) globally
- created a .eslintrc file in my home directory ,and included these in it
{ "env": { "browser": true, "es6": true, "node": true }, "plugins": [ "promise" ] } and I expect that when I run eslint in any directory the plugin to be known. so in my work directory I add a .eslintrc.json with all the rules I wanted to apply but I get these errors:
1:1 error Definition for rule 'promise/always-return' was not found promise/always-return 1:1 error Definition for rule 'promise/catch-or-return' was not found promise/catch-or-return 1:1 error Definition for rule 'promise/no-nesting' was not found promise/no-nesting Now if I add this to local .eslintrc
"plugins": [ "promise", ], I get this error : ESLint couldn't find the plugin "eslint-plugin-promise". and recommends me to install it locally. but that's exactly what I want to avoid.
1 Answer
Try to upgrade to the latest version of ESLint and make sure it's configured properly in .eslintrc.json