eslint-plugin-angular
eslint-plugin-angular copied to clipboard
TypeError: Cannot read property 'angular/ng_controller_name' of undefined
23:26 $ eslint src/js/services/auth.srv.js TypeError: Cannot read property 'angular/ng_controller_name' of undefined at Object.keys.forEach.key (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-ops.js:182:75) at Array.forEach (native) at deepmerge (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-ops.js:179:30) at Object.keys.forEach (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-ops.js:161:34) at Array.forEach (native) at deepmerge (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-ops.js:153:30) at Object.keys.forEach.key (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-ops.js:183:32) at Array.forEach (native) at Object.deepmerge [as merge] (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-ops.js:179:30) at loadConfigFile (/home/ben/.nvm/versions/node/v8.2.1/lib/node_modules/eslint/lib/config/config-file.js:240:22)
from my yaml file:
plugins:
- angular rules:
- angular/ng_controller_name: 0
it's just how it is in the example why is angular undefined? Yes I have eslint-plugin-angular installed with both --save-dev and -g options, and the error persists when I use the local version of eslint and the global version
Which version of the plugin do you use ? It looks like your configuration is wrong. Try with angular/controller_name instead of angular/ng_controller_name