How to import environment exported by eslint plugin? How to import environment exported by eslint plugin? angularjs angularjs

How to import environment exported by eslint plugin?


You are getting this error because ESLint can only use environments exposed by plugins and not configs. You have to register eslint-plugin-angular as plugin in your config file:

"plugins": ["angular"],"env": {  "angular/mocks": true}

If that still doesn't work, you should run ESLint with --debug flag to see if your config is correctly loaded and environment is applied. You can also run ESLint with --print-config flag followed by a path to some file in your repository to see all of the rules and global variables that ESLint will use when linting that file.