diff --git a/packages/cli-cache/README.md b/packages/cli-cache/README.md index ba62724c5..deab28038 100644 --- a/packages/cli-cache/README.md +++ b/packages/cli-cache/README.md @@ -3,7 +3,7 @@ [NPMIMGURL]: https://img.shields.io/npm/v/@putout/cli-cache.svg?style=flat&longCache=true [NPMURL]: https://npmjs.org/package/@putout/cli-cache "npm" -Create `cache` of places found by 🐊[Putout](https://github.com/coderaiser/putout). +Create `cache` of places found by 🐊[Putout](https://github.com/coderaiser/putout) to `places.json`. ## Install diff --git a/packages/cli-cache/lib/cache.js b/packages/cli-cache/lib/cache.js index 0ff663a3a..b05d0908e 100644 --- a/packages/cli-cache/lib/cache.js +++ b/packages/cli-cache/lib/cache.js @@ -19,7 +19,7 @@ const nodeVersion = process.version; const {assign} = Object; const returns = (a) => () => a; -const CACHE_FILE = '.putoutcache'; +const CACHE_FILE = '.putoutcache.json'; const defaultCache = { getPlaces: returns([]), @@ -128,7 +128,7 @@ async function findCachePath() { }); if (cacheDir) - return `${cacheDir}/places`; + return `${cacheDir}/places.json`; return CACHE_FILE; } diff --git a/packages/cli-cache/lib/cache.spec.js b/packages/cli-cache/lib/cache.spec.js index 9551f30e8..e4785730b 100644 --- a/packages/cli-cache/lib/cache.spec.js +++ b/packages/cli-cache/lib/cache.spec.js @@ -44,7 +44,7 @@ test('putout: cli: cache: fileCache: fresh', async (t) => { }); stopAll(); - const expected = 'node_modules/.cache/places'; + const expected = 'node_modules/.cache/places.json'; t.calledWith(unlink, [expected]); t.end(); diff --git a/packages/cli-cache/lib/is-changed.js b/packages/cli-cache/lib/is-changed.js index d54d5c4e9..63fef9f8e 100644 --- a/packages/cli-cache/lib/is-changed.js +++ b/packages/cli-cache/lib/is-changed.js @@ -39,6 +39,7 @@ async function isEslintChanged(fileCache, {findUp}) { '.eslintrc.cjs', '.eslintrc.yaml', '.eslintrc.yml', + '.eslint.config.js', ]); if (!name)