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
--cache-strategy is an argument introduced in ESLint v7.21.0, which can be set to either content or metadata. Before its addition, the default behavior was metadata, which doesn't help in CI context where the repository is cloned every time (the modification date of all the files are is to the clone time).
Using the content value for the argument, we can have an ESLint cache that works in CI.
Unfortunately, next doesn't support this argument yet, ie we can't pass it down to ESLint through next lint.
Expected Behavior
No error when using --cache-strategy argument
To Reproduce
Run in project root:
> yarn run next lint --cache --cache-strategy content --cache-location .cicache/eslint/.cache.json
Output:
yarn run v1.22.10
$ Path\to\project\node_modules\.bin\next lint --cache --cache-strategy content --cache-location .cicache/eslint/.cache.json
Unknown or unexpected option: --cache-strategy
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
* fix: support --cache-strategy ESLint argument
* add integration tests for --cache-strategy
* fix: add cacheStrategy to eslintOptions
* minor adjustments in next lint help message for --cache-strategy
Co-authored-by: Steven <[email protected]>
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 27, 2022
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
…ercel#29928)
* fix: support --cache-strategy ESLint argument
* add integration tests for --cache-strategy
* fix: add cacheStrategy to eslintOptions
* minor adjustments in next lint help message for --cache-strategy
Co-authored-by: Steven <[email protected]>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
11.1.2
What version of Node.js are you using?
14.16.1
What browser are you using?
Chrome
What operating system are you using?
Windows 10
How are you deploying your application?
next start
Describe the Bug
--cache-strategy
is an argument introduced in ESLint v7.21.0, which can be set to eithercontent
ormetadata
. Before its addition, the default behavior was metadata, which doesn't help in CI context where the repository is cloned every time (the modification date of all the files are is to the clone time).Using the
content
value for the argument, we can have an ESLint cache that works in CI.Unfortunately, next doesn't support this argument yet, ie we can't pass it down to ESLint through
next lint
.Expected Behavior
No error when using
--cache-strategy
argumentTo Reproduce
Run in project root:
Output:
The text was updated successfully, but these errors were encountered: