Skip to content

Commit

Permalink
feat(eslint): add eslint-plugin-import
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewLeedham committed Jan 2, 2020
1 parent 83dbf0c commit 565c546
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/xerox-eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module.exports = {
plugins: ['jest', 'prettier'],
plugins: ['jest', 'prettier', 'import'],
extends: [
'plugin:jest/recommended',
'prettier',
'prettier/babel',
'prettier/standard',
'plugin:import/errors',
'plugin:import/warnings',
],

env: {
Expand Down
6 changes: 4 additions & 2 deletions packages/xerox-eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
"@typescript-eslint/parser": "^2.13.0",
"babel-eslint": "^10.0.1",
"eslint-config-prettier": "^6.9.0",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.2.0",
"eslint-plugin-jsdoc": "^18.6.2",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.17.0"
},
"peerDependencies": {
"@xerox/prettier-config": "*",
"eslint": "~5",
"prettier": "~1",
"@xerox/prettier-config": "*"
"prettier": "~1"
}
}
6 changes: 6 additions & 0 deletions packages/xerox-eslint-config/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -12,6 +13,9 @@ module.exports = {
jsdoc: {
mode: 'typescript',
},
'import/resolver': {
typescript: {},
},
},
rules: {
'@typescript-eslint/camelcase': 'off',
Expand Down Expand Up @@ -69,6 +73,8 @@ module.exports = {
},
},
],
'import/default': 'off',
'import/export': 'off',
},
overrides: [
{
Expand Down

0 comments on commit 565c546

Please sign in to comment.