We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa7b3f2 commit b15efafCopy full SHA for b15efaf
1 file changed
index.js
@@ -7,7 +7,7 @@ var os = require('os')
7
var path = require('path')
8
var pkgConf = require('pkg-conf')
9
10
-var HOME_OR_TMP = os.homedir() || os.tmpdir()
+var CACHE_HOME = require('xdg-basedir').cache || os.tmpdir()
11
12
var DEFAULT_PATTERNS = [
13
'**/*.js',
@@ -39,7 +39,7 @@ function Linter (opts) {
39
var majorVersion = (m && m[1]) || '0'
40
41
// Example cache location: .standard-v12-cache/
42
- var cacheLocation = path.join(HOME_OR_TMP, `.${this.cmd}-v${majorVersion}-cache/`)
+ var cacheLocation = path.join(CACHE_HOME, this.cmd, `v${majorVersion}/`)
43
44
this.eslintConfig = Object.assign({
45
cache: true,
0 commit comments