Description
Is your feature request related to a problem? Please describe.
We would like to make ESLint cache files portable.
Use case 1: The cache file is created/updated in CI. The goal is to make the cache file reusable for CI runs, but different CI runs may have different directory structures.
Use case 2: The cache file is checked in the source control and shared among developers who can update it and commit the changes. Developers typically have different directory structures on local machines.
By "directory structures" I mean the location where the project is stored locally. For example, on one machine it can be /projects/my-app
, on another one /work/my-app
, /projects/work-my-app
or C:\projects\my-app
.
References:
- feat: relative cache support eslint/rfcs#114
- Change Request: Eslintcache relative eslint/eslint#16493
- Support relative paths in .eslintcache cache file eslint/eslint#16741
Describe the solution you'd like
I think the best solution would be to store file paths relative to the location of the cache file. I see the latest file-entry-cache v10.0.4 can store relative paths in the cache file, but not sure if and how it would be possible to make them relative to the location of the cache file.