I'm attempting to activate eslint caching by following the instructions in this section of the user guide
The command I am using is npm run lint -- --cache=true
, and the lint script simply executes a script that spawns esw
(which itself runs eslint
— we are using v7.x) as a child process.
In an earlier section of the user guide
Caching:
--cache Only check changed files - default: false
--cache-file path::String Path to cache file. Deprecated: use --cache-location - default: .eslintcache
--cache-location path::String Path to cache file or directory
--cache-strategy String Strategy for detecting changed files in cache - can be metadata or content - default: metadata
However, running the command results in:
npm WARN invalid config cache=true
npm WARN invalid config Must be a valid filesystem path
Even specifying --cache-location=.eslintcache
does not resolve the error message.
What steps should I take to enable caching?