@thermarthae/eslint-config 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +4 -2
- package/shared.cjs +9 -1
package/README.md
CHANGED
|
@@ -9,13 +9,13 @@ Just an Eslint config.
|
|
|
9
9
|
This step assumes that you have already installed Eslint and Typescript.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
yarn add -D @thermarthae/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort @stylistic/eslint-plugin
|
|
12
|
+
yarn add -D @thermarthae/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import@npm:eslint-plugin-i@latest eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort @stylistic/eslint-plugin
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
If you don't need React support:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
yarn add -D @thermarthae/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import eslint-plugin-simple-import-sort @stylistic/eslint-plugin
|
|
18
|
+
yarn add -D @thermarthae/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import@npm:eslint-plugin-i@latest eslint-plugin-simple-import-sort @stylistic/eslint-plugin
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### 2) Configure ESLint
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thermarthae/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "index.cjs",
|
|
5
5
|
"description": "Just a personal eslint config",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
28
28
|
"@typescript-eslint/parser": "^7.1.0",
|
|
29
29
|
"eslint": "^8.57.0",
|
|
30
|
-
"eslint-
|
|
30
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
31
|
+
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
31
32
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
32
33
|
"typescript": "^5.3.3"
|
|
33
34
|
},
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"@stylistic/eslint-plugin": "^1.6.2",
|
|
36
37
|
"@typescript-eslint/parser": "^6.20.0 || ^7.1.0",
|
|
37
38
|
"eslint": "^8.56.0",
|
|
39
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
38
40
|
"eslint-plugin-import": "^2.29.1",
|
|
39
41
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
40
42
|
"eslint-plugin-react": "^7.33.2",
|
package/shared.cjs
CHANGED
|
@@ -14,10 +14,11 @@ module.exports = {
|
|
|
14
14
|
'plugin:@typescript-eslint/recommended-type-checked',
|
|
15
15
|
'plugin:@typescript-eslint/stylistic-type-checked',
|
|
16
16
|
'plugin:@stylistic/disable-legacy',
|
|
17
|
+
'plugin:import/recommended',
|
|
18
|
+
'plugin:import/typescript',
|
|
17
19
|
],
|
|
18
20
|
plugins: [
|
|
19
21
|
'@typescript-eslint',
|
|
20
|
-
'import',
|
|
21
22
|
'simple-import-sort',
|
|
22
23
|
'@stylistic',
|
|
23
24
|
],
|
|
@@ -25,6 +26,13 @@ module.exports = {
|
|
|
25
26
|
parserOptions: {
|
|
26
27
|
project: true,
|
|
27
28
|
sourceType: 'module',
|
|
29
|
+
ecmaVersion: 'latest',
|
|
30
|
+
},
|
|
31
|
+
settings: {
|
|
32
|
+
'import/external-module-folders': ['.yarn', 'node_modules', 'node_modules/@types'],
|
|
33
|
+
'import/resolver': {
|
|
34
|
+
typescript: true,
|
|
35
|
+
},
|
|
28
36
|
},
|
|
29
37
|
overrides: [
|
|
30
38
|
{
|