Skip to content

Commit 127aa38

Browse files
author
DD Liu
committed
use path.resolve for config
1 parent eb989d7 commit 127aa38

File tree

3 files changed

+16
-22
lines changed

3 files changed

+16
-22
lines changed

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"eslint": "^5.0.1",
5757
"eslint-config-scratch": "^5.0.0",
5858
"eslint-import-resolver-webpack": "^0.11.1",
59-
"eslint-plugin-import": "^2.8.0",
59+
"eslint-plugin-import": "^2.18.2",
6060
"eslint-plugin-jest": "^22.14.1",
6161
"eslint-plugin-react": "^7.12.4",
6262
"file-loader": "2.0.0",

src/.eslintrc.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const path = require('path');
12
module.exports = {
23
root: true,
34
extends: ['scratch', 'scratch/es6', 'scratch/react', 'plugin:import/errors'],
@@ -22,15 +23,8 @@ module.exports = {
2223
version: '16.2' // Prevent 16.3 lifecycle method errors
2324
},
2425
'import/resolver': {
25-
'webpack': {
26-
'config': {
27-
'resolve': {
28-
'extensions': [
29-
'.js',
30-
'.jsx'
31-
]
32-
}
33-
}
26+
webpack: {
27+
config: path.resolve(__dirname, '../webpack.config.js')
3428
}
3529
}
3630
}

0 commit comments

Comments
 (0)