Skip to content

Commit fc30597

Browse files
authoredMar 25, 2020
Change XO cache path to avoid conflicts when upgrading (#443)
1 parent cf98e72 commit fc30597

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

Diff for: ‎lib/options-manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const {
3434
} = require('./constants');
3535

3636
const nodeVersion = process && process.version;
37-
const cacheLocation = findCacheDir({name: 'xo'}) || path.join(os.homedir() || os.tmpdir(), '.xo-cache/');
37+
const cacheLocation = findCacheDir({name: 'xo-linter'}) || path.join(os.homedir() || os.tmpdir(), '.xo-cache/');
3838

3939
const DEFAULT_CONFIG = {
4040
useEslintrc: false,

Diff for: ‎test/options-manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test('normalizeOptions: falsie values stay falsie', t => {
4646

4747
test('buildConfig: defaults', t => {
4848
const config = manager.buildConfig({});
49-
t.regex(slash(config.cacheLocation), /[\\/]\.cache\/xo\/xo-cache.json[\\/]?$/u);
49+
t.regex(slash(config.cacheLocation), /[\\/]\.cache\/xo-linter\/xo-cache.json[\\/]?$/u);
5050
t.is(config.useEslintrc, false);
5151
t.is(config.cache, true);
5252
t.is(config.baseConfig.extends[0], 'xo/esnext');

0 commit comments

Comments
 (0)
Please sign in to comment.