I'm trying to integrate ESLint into my project and I'm running into the error: "Cannot find module 'eslint-plugin-angular'" when I run $ eslint *.js
.
The only way I can get this to run is by installing eslint-plugin-angular globally, but that seems wrong (unless I'm missing something??).
I'm running:
- node v0.12.7
- npm 3.3.4
- eslint v1.5.0
- eslint-plugin-angular 0.12.0
ESLint is installed globally.
My package.json
file has the following entries:
- "eslint": "^1.5.0",
- "eslint-plugin-angular": "^0.12.0",
I have $ rm -rf node_modules
and rerun $ npm install
to make sure there wasn't some kind of npm dependency issue or corruption. I also verified the directory permissions in node_modules
to make sure access is possible.
My .eslintrc
contains:
{
"plugins": [
"angular"
],
"rules": {
"angular/ng_controller_name": [
2,
"/[A-Z].*Controller$/"
],
"quotes": [
2,
"single"
]
},
"globals": {
"angular": true
}
}
What am I missing here? Thx! ps. I did open a ticket on github: https://github.com/Gillespie59/eslint-plugin-angular/issues/222 -- just wondering if someone in the Stack community has run into this.