Skip to content

Commit a332ec4

Browse files
committed
chore: update eslint and maintain eslint ignore correctly
1 parent bc6e13f commit a332ec4

File tree

7 files changed

+204
-194
lines changed

7 files changed

+204
-194
lines changed

.eslint-imports.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintignore

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
packages/*/src/lib/
2-
packages/*/lib/
3-
packages/*/dist/
2+
3+
# build results for base package
4+
packages/base/cjs
5+
packages/base/Device
6+
packages/base/hooks
7+
packages/base/lib
8+
packages/base/polyfill
9+
packages/base/scripts
10+
packages/base/styling
11+
packages/base/types
12+
packages/base/utils
13+
14+
# build results for charts package
15+
packages/charts/cjs
16+
packages/charts/components
17+
packages/charts/hooks
18+
packages/charts/interfaces
19+
packages/charts/internal
20+
packages/charts/lib
21+
22+
# build results for main package
23+
packages/main/cjs
24+
packages/main/components
25+
packages/main/dist
26+
packages/main/enums
27+
packages/main/interfaces
28+
packages/main/internal
29+
packages/main/lib
30+
packages/main/scripts
31+
packages/main/webComponents
32+
33+
434
scripts
535
shared
636
.eslintrc.js
@@ -11,3 +41,4 @@ rollup.config.js
1141
index.cjs.js
1242
index.esm.js
1343
packages/cra-template
44+

.eslintrc.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ module.exports = {
66
'plugin:@typescript-eslint/recommended',
77
'plugin:@typescript-eslint/recommended-requiring-type-checking',
88
'plugin:react/recommended',
9-
'prettier',
10-
'./.eslint-imports.js'
9+
'plugin:import/errors',
10+
'plugin:import/warnings',
11+
'plugin:import/typescript',
12+
'prettier'
1113
],
1214
parser: '@typescript-eslint/parser',
1315
parserOptions: {
@@ -122,6 +124,17 @@ module.exports = {
122124
'react/self-closing-comp': 'error',
123125
'spaced-comment': 'error',
124126
'use-isnan': 'error',
125-
'valid-typeof': 'off'
127+
'valid-typeof': 'off',
128+
'import/order': [
129+
'error',
130+
{
131+
'newlines-between': 'never',
132+
alphabetize: {
133+
order: 'asc',
134+
caseInsensitive: true
135+
}
136+
}
137+
],
138+
'import/no-duplicates': 2
126139
}
127140
};

config/rules/noIndexImportsRule.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

config/rules/noIndexImportsRule.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"@types/jest": "^26.0.8",
5858
"@types/react": "^16.9.34",
5959
"@types/react-dom": "^16.9.6",
60-
"@typescript-eslint/eslint-plugin": "^3.7.0",
61-
"@typescript-eslint/parser": "^3.7.0",
60+
"@typescript-eslint/eslint-plugin": "^4.4.0",
61+
"@typescript-eslint/parser": "^4.4.0",
6262
"@ui5/webcomponents-tools": "^1.0.0-rc.8",
6363
"babel-loader": "^8.1.0",
6464
"chalk": "^4.0.0",
@@ -67,12 +67,12 @@
6767
"enzyme": "^3.11.0",
6868
"enzyme-adapter-react-16": "^1.15.2",
6969
"enzyme-to-json": "^3.4.4",
70-
"eslint": "^7.5.0",
71-
"eslint-config-prettier": "^6.11.0",
72-
"eslint-plugin-import": "^2.22.0",
70+
"eslint": "^7.10.0",
71+
"eslint-config-prettier": "^6.12.0",
72+
"eslint-plugin-import": "^2.22.1",
7373
"eslint-plugin-prefer-arrow": "^1.2.2",
74-
"eslint-plugin-react": "^7.20.3",
75-
"eslint-plugin-react-hooks": "^4.0.8",
74+
"eslint-plugin-react": "^7.21.3",
75+
"eslint-plugin-react-hooks": "^4.1.2",
7676
"glob": "^7.1.6",
7777
"husky": "^4.2.5",
7878
"identity-obj-proxy": "^3.0.0",

0 commit comments

Comments
 (0)