File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var os = require('os')
7
7
var path = require ( 'path' )
8
8
var pkgConf = require ( 'pkg-conf' )
9
9
10
- var HOME_OR_TMP = os . homedir ( ) || os . tmpdir ( )
10
+ var CACHE_HOME = require ( 'xdg-basedir' ) . cache || os . tmpdir ( )
11
11
12
12
var DEFAULT_PATTERNS = [
13
13
'**/*.js' ,
@@ -38,8 +38,8 @@ function Linter (opts) {
38
38
var m = opts . version && opts . version . match ( / ^ ( \d + ) \. / )
39
39
var majorVersion = ( m && m [ 1 ] ) || '0'
40
40
41
- // Example cache location: . standard- v12-cache /
42
- var cacheLocation = path . join ( HOME_OR_TMP , `. ${ this . cmd } - v${ majorVersion } -cache /`)
41
+ // Example cache location: ~/.cache/ standard/ v12/
42
+ var cacheLocation = path . join ( CACHE_HOME , this . cmd , ` v${ majorVersion } /`)
43
43
44
44
this . eslintConfig = Object . assign ( {
45
45
cache : true ,
Original file line number Diff line number Diff line change 37
37
"deglob" : " ^4.0.1" ,
38
38
"get-stdin" : " ^8.0.0" ,
39
39
"minimist" : " ^1.2.5" ,
40
- "pkg-conf" : " ^3.1.0"
40
+ "pkg-conf" : " ^3.1.0" ,
41
+ "xdg-basedir" : " ^4.0.0"
41
42
},
42
43
"devDependencies" : {
43
44
"babel-eslint" : " ^10.1.0" ,
You can’t perform that action at this time.
0 commit comments