Skip to content

Commit

Permalink
Change XO cache path to avoid conflicts when upgrading (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Mar 25, 2020
1 parent cf98e72 commit fc30597
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/options-manager.js
Expand Up @@ -34,7 +34,7 @@ const {
} = require('./constants');

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

const DEFAULT_CONFIG = {
useEslintrc: false,
Expand Down
2 changes: 1 addition & 1 deletion test/options-manager.js
Expand Up @@ -46,7 +46,7 @@ test('normalizeOptions: falsie values stay falsie', t => {

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

0 comments on commit fc30597

Please sign in to comment.