-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Bug: cache doesn't invalidate on plugin version upgrade #16284
Comments
I think the only way we can guarantee this with the new config system is to ask plugin authors to include a |
I am wondering why we can't read the version out of the package.json file? |
@CSchulz because with flat config we don't have any package information. You are manually importing a package and then passing the object into the config. We don't know where that object came from inside of ESLint. |
I think I did not get the point. I have checked out the new experimental feature documentation and there is still the plugins array to put custom plugins. Lines 132 to 144 in 740b208
|
No. What you're looking at is the code that loads the plugins from the command line |
So I think we can use the same approach as in #16875, where we ask plugins to supply a |
My idea was to combine the two, so |
Updates `FlatConfigArray` to look for meta information on plugins when serializing a config. Fixes #16284
Updates `FlatConfigArray` to look for meta information on plugins when serializing a config. Fixes #16284
* feat: Use plugin metadata for flat config serialization Updates `FlatConfigArray` to look for meta information on plugins when serializing a config. Fixes #16284 * Update docs/src/extend/plugins.md Co-authored-by: Nitin Kumar <[email protected]> * Rebase --------- Co-authored-by: Nitin Kumar <[email protected]>
Environment
Node version: v16.15.1
npm version: N/A - using yarn
Local ESLint version: 8.23.0
Global ESLint version: no global eslint installed
Operating System: MacOS 12.5.1
What parser are you using?
@babel/eslint-parser
What did you do?
I upgraded eslint-plugin-react from 7.37.1 to 7.37.7.
Due to new rules addition and the cache for the former version still being used, offenses for those new rules weren't being reported.
My code contains the following:
What did you expect to happen?
Offenses to be reported
What actually happened?
Nothing was reported
Participation
Additional comments
Should be fixed by this PR: eslint/eslintrc#88
The text was updated successfully, but these errors were encountered: