File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
packages/eslint-config-react-app Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
'use strict' ;
11
11
12
+ const resolveNodePath = require ( './utils/resolveNodePath' ) ;
13
+
12
14
// Inspired by https://github.com/airbnb/javascript but less opinionated.
13
15
14
16
// We use eslint-loader so even warnings are very visible.
@@ -49,6 +51,7 @@ module.exports = {
49
51
'import/resolver' : {
50
52
node : {
51
53
extensions : [ '.js' , '.json' ] ,
54
+ moduleDirectory : [ 'node_modules' ] . concat ( resolveNodePath ( ) ) ,
52
55
} ,
53
56
} ,
54
57
} ,
Original file line number Diff line number Diff line change 8
8
"url" : " https://github.com/facebookincubator/create-react-app/issues"
9
9
},
10
10
"files" : [
11
+ " utils" ,
11
12
" index.js"
12
13
],
13
14
"peerDependencies" : {
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ function resolveNodePath ( ) {
4
+ const nodePaths = ( process . env . NODE_PATH || '' )
5
+ . split ( process . platform === 'win32' ? ';' : ':' )
6
+ . filter ( Boolean ) ;
7
+
8
+ return nodePaths ;
9
+ }
10
+
11
+ module . exports = resolveNodePath ;
You can’t perform that action at this time.
0 commit comments