updating .eslintrc doesn't invalidate the cache
See original GitHub issueExpected Behavior
Updating linting rules/config should invalidate linting cache.
Current Behavior
When running eslint it’ll show the cached output even though .eslintrc (workspace root) was changed.
❯ nx lint akita
> nx run akita:lint
> NX NOTE Cached Output:
Linting "akita"...
Failure Information (for bugs)
Steps to Reproduce
I’m not sure when the cache kicks in, but once it does you can reproduce this.
- nx lint stuff
- watch cache kick in
- add a new rule to the rules section in the root .eslintrc
- nx lint stuff
- observe the previous cached and now invalid response
Context
> NX Report complete - copy this into the issue template
@nrwl/angular : 9.2.2
@nrwl/cli : 9.2.2
@nrwl/cypress : 9.2.2
@nrwl/eslint-plugin-nx : 9.2.2
@nrwl/express : 9.2.2
@nrwl/jest : 9.2.2
@nrwl/linter : 9.2.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 9.2.2
@nrwl/react : 9.2.2
@nrwl/schematics : Not Found
@nrwl/tao : 9.2.2
@nrwl/web : 9.2.2
@nrwl/workspace : 9.2.2
typescript : 3.8.3
“eslint”: “6.8.0”, “@typescript-eslint/eslint-plugin”: “2.28.0”, “@typescript-eslint/parser”: “2.28.0”,
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Cache invalidation - Sitefinity CMS Setup and maintenance
Cache is invalidated when item of a particular type with provided custom key is created, updated, or deleted. Under the hood DataItemCacheDependency works...
Read more >Invalidation from Mutations | TanStack Query Docs
Usually when a mutation in your app succeeds, it's VERY likely that there are related queries in your application that need to be...
Read more >Discussion of Cache Busting a React App - DEV Community
My understanding is EVEN with a refresh, some applications are cached, hence various solutions used to invalidate cache. In my react app, if...
Read more >Gajus on Twitter: "TIL that #eslint --cache is _not_ enabled by ...
My guess is because it is not particularly smart, e.g. changing .eslintrc will not invalidate cache. It would only be a safe default...
Read more >eslint | Yarn - Package Manager
Make sure your plugins (and ESLint) are both in your project's package.json as devDependencies (or dependencies, if your project uses ESLint at runtime)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry. The issue was marked by mistake. I removed the label.
Can you please try
cat .eslintrc
instead ofecho
? Echo will print out the file name, but we want to print out the contents, so it invalidates the cache when they change (as Jack mentioned)