New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not implicitly cache package.json
#4610
Do not implicitly cache package.json
#4610
Conversation
Thanks for the pull request, @SpainTrain! It looks like this is your first time contributing to ESLint, so please take a moment to read over our contribution guidelines. We'll also need you to sign our CLA, which is just a way for you to say that you give us permission to use your contribution. If you have any questions about the process, don't hesitate to ask. |
f8240dd
to
933cded
Compare
LGTM. |
@SpainTrain Thanks. Can you add a test that validates the change? |
933cded
to
836e8ee
Compare
* Read `package.json` on every config load by not using `require`
836e8ee
to
f912e21
Compare
✅ |
Awesome, thanks! |
Do not implicitly cache `package.json`
Read `.eslintrc.js` on every config load by not using `require` Related: eslint#4610
Read `.eslintrc.js` on every config load by not using `require` Related: eslint#4610
Read `.eslintrc.js` on every config load by not using `require` Related: eslint#4610
Currently eslint will load the config stored in a project's package.json using
require
. The downside to this is that the json is cached inrequire.cache
. Thus, if eslint is executed twice in the same process, and the config has changed in the interim, it will not read the new config. For an example of this causing a downstream bug in the wild see AtomLinter/linter-eslint#349Closes #4611