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.
When an ESLint project is not in the root directory, e.g.
Some editor plugins does not
cd
intoclient
directory when invoking ESLint. Thereforeprocess.cwd()
is "our-project", which meansrequireUp
will not find our "eslint-local-rules.js".This problem is fixed by making this plugin require from
__dirname
instead ofprocess.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.