@ethberry/eslint-config 5.0.3 → 5.0.5
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/package.json +18 -18
- package/presets/ts.mjs +2 -0
- package/presets/tsx.mjs +2 -0
- package/rules/import.mjs +29 -2
- package/rules/typescript.mjs +1 -0
package/package.json
CHANGED
|
@@ -8,24 +8,24 @@
|
|
|
8
8
|
"url": "https://github.com/ethberry/eslint-config/issues"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@eslint/js": "9.
|
|
12
|
-
"@stylistic/eslint-plugin-js": "2.
|
|
13
|
-
"@stylistic/eslint-plugin-jsx": "2.
|
|
14
|
-
"@stylistic/eslint-plugin-ts": "2.
|
|
15
|
-
"eslint": "9.
|
|
16
|
-
"eslint-config-prettier": "
|
|
17
|
-
"eslint-plugin-import": "2.
|
|
18
|
-
"eslint-plugin-jest": "28.
|
|
11
|
+
"@eslint/js": "9.21.0",
|
|
12
|
+
"@stylistic/eslint-plugin-js": "4.2.0",
|
|
13
|
+
"@stylistic/eslint-plugin-jsx": "4.2.0",
|
|
14
|
+
"@stylistic/eslint-plugin-ts": "4.2.0",
|
|
15
|
+
"eslint": "9.21.0",
|
|
16
|
+
"eslint-config-prettier": "10.1.0",
|
|
17
|
+
"eslint-plugin-import": "2.31.0",
|
|
18
|
+
"eslint-plugin-jest": "28.11.0",
|
|
19
19
|
"eslint-plugin-mocha": "10.5.0",
|
|
20
|
-
"eslint-plugin-n": "17.
|
|
21
|
-
"eslint-plugin-prettier": "5.2.
|
|
22
|
-
"eslint-plugin-promise": "7.1
|
|
23
|
-
"eslint-plugin-react": "7.
|
|
24
|
-
"eslint-plugin-testing-library": "
|
|
25
|
-
"globals": "
|
|
26
|
-
"prettier": "3.
|
|
27
|
-
"typescript": "5.
|
|
28
|
-
"typescript-eslint": "8.
|
|
20
|
+
"eslint-plugin-n": "17.16.2",
|
|
21
|
+
"eslint-plugin-prettier": "5.2.3",
|
|
22
|
+
"eslint-plugin-promise": "7.2.1",
|
|
23
|
+
"eslint-plugin-react": "7.37.4",
|
|
24
|
+
"eslint-plugin-testing-library": "7.1.1",
|
|
25
|
+
"globals": "16.0.0",
|
|
26
|
+
"prettier": "3.5.3",
|
|
27
|
+
"typescript": "5.8.2",
|
|
28
|
+
"typescript-eslint": "8.26.0"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=22"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
},
|
|
48
48
|
"sideEffects": false,
|
|
49
49
|
"title": "EthBerry ESLint config",
|
|
50
|
-
"version": "5.0.
|
|
50
|
+
"version": "5.0.5"
|
|
51
51
|
}
|
package/presets/ts.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import commonRules from "../rules/common.mjs";
|
|
|
3
3
|
import promiseRules from "../rules/promise.mjs";
|
|
4
4
|
import nodeRules from "../rules/node.mjs";
|
|
5
5
|
import prettierRules from "../rules/prettier.mjs";
|
|
6
|
+
import importRules from "../rules/import.mjs";
|
|
6
7
|
|
|
7
8
|
export default [
|
|
8
9
|
...commonRules,
|
|
@@ -10,4 +11,5 @@ export default [
|
|
|
10
11
|
...promiseRules,
|
|
11
12
|
...nodeRules,
|
|
12
13
|
...prettierRules,
|
|
14
|
+
...importRules,
|
|
13
15
|
]
|
package/presets/tsx.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import promiseRules from "../rules/promise.mjs";
|
|
|
4
4
|
import nodeRules from "../rules/node.mjs";
|
|
5
5
|
import reactRules from "../rules/react.mjs";
|
|
6
6
|
import prettierRules from "../rules/prettier.mjs";
|
|
7
|
+
import importRules from "../rules/import.mjs";
|
|
7
8
|
|
|
8
9
|
export default [
|
|
9
10
|
...commonRules,
|
|
@@ -12,5 +13,6 @@ export default [
|
|
|
12
13
|
...nodeRules,
|
|
13
14
|
...reactRules,
|
|
14
15
|
...prettierRules,
|
|
16
|
+
...importRules,
|
|
15
17
|
];
|
|
16
18
|
|
package/rules/import.mjs
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import importPlugin from "eslint-plugin-import";
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
|
-
|
|
4
|
+
importPlugin.flatConfigs.recommended,
|
|
5
|
+
importPlugin.flatConfigs.typescript,
|
|
6
|
+
{
|
|
7
|
+
rules: {
|
|
8
|
+
'import/order': [
|
|
9
|
+
"error",
|
|
10
|
+
{
|
|
11
|
+
"groups": [
|
|
12
|
+
"builtin",
|
|
13
|
+
"external",
|
|
14
|
+
"internal",
|
|
15
|
+
["sibling", "parent"],
|
|
16
|
+
"index",
|
|
17
|
+
"object",
|
|
18
|
+
],
|
|
19
|
+
"pathGroups": [
|
|
20
|
+
{
|
|
21
|
+
"pattern": "@{ethberry,framework}/**",
|
|
22
|
+
"group": "external",
|
|
23
|
+
"position": "after"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"pathGroupsExcludedImportTypes": ["builtin"],
|
|
27
|
+
'newlines-between': 'always',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
}
|
|
5
32
|
]
|
package/rules/typescript.mjs
CHANGED
|
@@ -15,6 +15,7 @@ export default [
|
|
|
15
15
|
{
|
|
16
16
|
files: ["**/*.{ts,tsx,mtsx}"],
|
|
17
17
|
rules: {
|
|
18
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
18
19
|
"@typescript-eslint/no-unsafe-return": "warn",
|
|
19
20
|
"@typescript-eslint/no-unsafe-call": "warn",
|
|
20
21
|
"@typescript-eslint/no-misused-promises": "warn",
|