You get this error because ESLint can only use environments open by plugins, not configs. You must register eslint-plugin-angular as a plugin in your configuration file:
"plugins": ["angular"], "env": { "angular/mocks": true }
If this still does not work, you should run ESLint with the --debug flag to find out if your configuration is loaded correctly and the environment is applied. You can also run ESLint with the --print --print-config flag, followed by the path to some file in your repository, to see all the rules and global variables that ESLint will use when dragging this file.
source share