Skip to content

Commit

Permalink
feat!: add import-order plugin and rule (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
goshander authored Dec 16, 2022
1 parent 0366bdc commit 019d25d
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 2 deletions.
21 changes: 21 additions & 0 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
es6: true,
'shared-node-browser': true,
},
plugins: ['import'],
rules: {
// Possible Errors
'no-empty': OFF, // eslint:recommended
Expand Down Expand Up @@ -102,6 +103,26 @@ module.exports = {
'prefer-spread': ERROR,
'require-atomic-updates': OFF, // eslint:recommended
'require-yield': WARNING, // eslint:recommended

// Additional Plugins
'import/order': [
ERROR,
{
'alphabetize': {
order: 'asc'
},
'newlines-between': 'always',
'groups': [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
'warnOnUnassignedImports': true
}
]
},
overrides: [{
files: ['*.ts', '*.tsx'],
Expand Down
250 changes: 250 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@typescript-eslint/eslint-plugin": "5.40.0",
"@typescript-eslint/parser": "5.40.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.27.0",
"eslint-plugin-react-hooks": "4.3.0",
Expand Down
Loading

0 comments on commit 019d25d

Please sign in to comment.