Skip to content

Commit e8b0a30

Browse files
committed
upgrade to eslint-plugin-import@2
1 parent 4c797d8 commit e8b0a30

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

config/plugins.js

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
experimentalObjectRestSpread: true
1010
}
1111
},
12+
// -- end repeat
1213
plugins: [
1314
'no-use-extend-native',
1415
'ava',
@@ -21,35 +22,42 @@ module.exports = {
2122
'plugin:unicorn/recommended'
2223
],
2324
settings: {
24-
'import/extensions': ['.js'] // TODO: remove this when eslint-plugin-import@2 is out
25+
'import/core-modules': [
26+
'electron',
27+
'atom'
28+
]
2529
},
2630
rules: {
2731
'no-use-extend-native/no-use-extend-native': 2,
2832
'promise/param-names': 2,
29-
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/268
30-
// 'import/default': 2,
33+
'import/default': 2,
3134
'import/export': 2,
3235
'import/extensions': [2, {
3336
js: 'never',
3437
json: 'never',
3538
jsx: 'never'
3639
}],
37-
'import/imports-first': 2,
38-
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/268
39-
// 'import/named': 2,
40-
'import/namespace': 2,
40+
'import/first': 2,
41+
'import/named': 2,
42+
'import/namespace': [2, {allowComputed: true}],
43+
'import/no-absolute-path': 2,
44+
'import/no-dynamic-require': 2,
45+
'import/no-webpack-loader-syntax': 2,
4146
'import/newline-after-import': 2,
4247
'import/no-amd': 2,
4348
// enable this sometime in the future when Node.js has ES2015 module support
49+
// 'import/unambiguous': 2,
50+
// enable this sometime in the future when Node.js has ES2015 module support
4451
// 'import/no-commonjs': 2,
4552
// looks useful, but too unstable at the moment
4653
// 'import/no-deprecated': 2,
4754
'import/no-extraneous-dependencies': 2,
4855
'import/no-mutable-exports': 2,
4956
'import/no-named-as-default-member': 2,
5057
'import/no-named-as-default': 2,
51-
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/275
52-
// 'import/no-unresolved': [2, {commonjs: true}],
53-
'import/order': 2
58+
'import/no-unresolved': [2, {commonjs: true}],
59+
'import/order': 2,
60+
'import/prefer-default-export': 2,
61+
'import/no-unassigned-import': 2
5462
}
5563
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"eslint-config-xo": "^0.16.0",
6969
"eslint-formatter-pretty": "^1.0.0",
7070
"eslint-plugin-ava": "^3.0.0",
71-
"eslint-plugin-import": "^1.7.0",
71+
"eslint-plugin-import": "^2.0.0",
7272
"eslint-plugin-no-use-extend-native": "^0.3.2",
7373
"eslint-plugin-promise": "^2.0.1",
7474
"eslint-plugin-unicorn": "^1.0.0",

0 commit comments

Comments
 (0)