You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix VS Code integration when ESLint project outside VS Code project
When an ESLint project is not in the root directory, e.g.
+ our-project
|--+ client
| |--- src/
| |--- package.json
| |--- eslint-local-rules.js
|--+ server
| |--- stuff
Some editor plugins does not `cd` into `client` directory when invoking
ESLint. Therefore `process.cwd()` is "our-project", which means `requireUp`
will not find our "eslint-local-rules.js".
This problem is fixed by making this plugin require from `__dirname` instead
of `process.cwd()`. Intuitively, the behavior of the plugin should not depend
on where it is run.
This commit also makes `eslint-plugin-local-rules` fail loudly if the rules
file is not found.
0 commit comments