Skip to content

Commit

Permalink
upgrade to eslint-plugin-import@2
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 3, 2016
1 parent 4c797d8 commit e8b0a30
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
28 changes: 18 additions & 10 deletions config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
experimentalObjectRestSpread: true
}
},
// -- end repeat
plugins: [
'no-use-extend-native',
'ava',
Expand All @@ -21,35 +22,42 @@ module.exports = {
'plugin:unicorn/recommended'
],
settings: {
'import/extensions': ['.js'] // TODO: remove this when eslint-plugin-import@2 is out
'import/core-modules': [
'electron',
'atom'
]
},
rules: {
'no-use-extend-native/no-use-extend-native': 2,
'promise/param-names': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/268
// 'import/default': 2,
'import/default': 2,
'import/export': 2,
'import/extensions': [2, {
js: 'never',
json: 'never',
jsx: 'never'
}],
'import/imports-first': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/268
// 'import/named': 2,
'import/namespace': 2,
'import/first': 2,
'import/named': 2,
'import/namespace': [2, {allowComputed: true}],
'import/no-absolute-path': 2,
'import/no-dynamic-require': 2,
'import/no-webpack-loader-syntax': 2,
'import/newline-after-import': 2,
'import/no-amd': 2,
// enable this sometime in the future when Node.js has ES2015 module support
// 'import/unambiguous': 2,
// enable this sometime in the future when Node.js has ES2015 module support
// 'import/no-commonjs': 2,
// looks useful, but too unstable at the moment
// 'import/no-deprecated': 2,
'import/no-extraneous-dependencies': 2,
'import/no-mutable-exports': 2,
'import/no-named-as-default-member': 2,
'import/no-named-as-default': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/275
// 'import/no-unresolved': [2, {commonjs: true}],
'import/order': 2
'import/no-unresolved': [2, {commonjs: true}],
'import/order': 2,
'import/prefer-default-export': 2,
'import/no-unassigned-import': 2
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"eslint-config-xo": "^0.16.0",
"eslint-formatter-pretty": "^1.0.0",
"eslint-plugin-ava": "^3.0.0",
"eslint-plugin-import": "^1.7.0",
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-no-use-extend-native": "^0.3.2",
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-unicorn": "^1.0.0",
Expand Down

0 comments on commit e8b0a30

Please sign in to comment.