@leancodepl/eslint-config 7.3.7 → 7.5.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/CHANGELOG.md +25 -0
- package/package.json +12 -11
- package/src/lib/imports.json +34 -13
- package/src/lib/index.json +57 -20
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [7.5.0](https://github.com/leancodepl/js_corelibrary/compare/v7.4.0...v7.5.0) (2024-07-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @leancodepl/eslint-config
|
|
9
|
+
|
|
10
|
+
# Change Log
|
|
11
|
+
|
|
12
|
+
All notable changes to this project will be documented in this file. See
|
|
13
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
14
|
+
|
|
15
|
+
# [7.4.0](https://github.com/leancodepl/js_corelibrary/compare/v7.3.7...v7.4.0) (2024-05-16)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- add import sorting
|
|
20
|
+
([5a20d92](https://github.com/leancodepl/js_corelibrary/commit/5a20d92d932427ec98656bc823a76765d0bdb5e6))
|
|
21
|
+
- add new rules and perfectionist plugin
|
|
22
|
+
([d069802](https://github.com/leancodepl/js_corelibrary/commit/d0698021c47440c1e82175a4920ec265974dbbd6))
|
|
23
|
+
- remove sort-exports rule
|
|
24
|
+
([60a6a6d](https://github.com/leancodepl/js_corelibrary/commit/60a6a6dbfcbb30fa08ff743da294823e1219d7c6))
|
|
25
|
+
|
|
26
|
+
# Change Log
|
|
27
|
+
|
|
28
|
+
All notable changes to this project will be documented in this file. See
|
|
29
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
30
|
+
|
|
6
31
|
## [7.3.7](https://github.com/leancodepl/js_corelibrary/compare/v7.3.6...v7.3.7) (2024-04-15)
|
|
7
32
|
|
|
8
33
|
**Note:** Version bump only for package @leancodepl/eslint-config
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leancodepl/eslint-config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "src/index.json",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@typescript-eslint/eslint-plugin": ">=
|
|
8
|
-
"@typescript-eslint/parser": ">=
|
|
7
|
+
"@typescript-eslint/eslint-plugin": ">=7.7.0",
|
|
8
|
+
"@typescript-eslint/parser": ">=7.7.0",
|
|
9
9
|
"eslint": ">=8.9.0",
|
|
10
|
-
"eslint-config-prettier": ">=
|
|
11
|
-
"eslint-plugin-import": ">=2.
|
|
12
|
-
"eslint-plugin-jsx-a11y": ">=6.
|
|
13
|
-
"eslint-plugin-
|
|
14
|
-
"eslint-plugin-react
|
|
15
|
-
"eslint-plugin-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
10
|
+
"eslint-config-prettier": ">=9.1.0",
|
|
11
|
+
"eslint-plugin-import": ">=2.29.1",
|
|
12
|
+
"eslint-plugin-jsx-a11y": ">=6.8.0",
|
|
13
|
+
"eslint-plugin-perfectionist": "^2.9.0",
|
|
14
|
+
"eslint-plugin-react": ">=7.34.1",
|
|
15
|
+
"eslint-plugin-react-hooks": ">=4.6.0",
|
|
16
|
+
"eslint-plugin-unused-imports": "^3.0.0",
|
|
17
|
+
"prettier": ">=3.0.0",
|
|
18
|
+
"typescript": ">=5.0.0"
|
|
18
19
|
}
|
|
19
20
|
}
|
package/src/lib/imports.json
CHANGED
|
@@ -16,22 +16,38 @@
|
|
|
16
16
|
"noUselessIndex": true
|
|
17
17
|
}
|
|
18
18
|
],
|
|
19
|
-
"
|
|
19
|
+
"perfectionist/sort-imports": [
|
|
20
20
|
"error",
|
|
21
21
|
{
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
"type": "natural",
|
|
23
|
+
"order": "asc",
|
|
24
|
+
"groups": [
|
|
25
|
+
"react",
|
|
26
|
+
["builtin", "external"],
|
|
27
|
+
["internal-type", "internal"],
|
|
28
|
+
["parent", "sibling", "index"],
|
|
29
|
+
["type", "parent-type", "sibling-type", "index-type"],
|
|
30
|
+
"side-effect",
|
|
31
|
+
"style",
|
|
32
|
+
"unknown"
|
|
29
33
|
],
|
|
34
|
+
"custom-groups": {
|
|
35
|
+
"value": {
|
|
36
|
+
"react": ["react", "react-*"]
|
|
37
|
+
},
|
|
38
|
+
"type": {
|
|
39
|
+
"react": "react"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
30
42
|
"newlines-between": "never",
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
"internal-pattern": ["@leancodepl/**"]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"perfectionist/sort-named-imports": [
|
|
47
|
+
"error",
|
|
48
|
+
{
|
|
49
|
+
"type": "natural",
|
|
50
|
+
"order": "asc"
|
|
35
51
|
}
|
|
36
52
|
],
|
|
37
53
|
"react/jsx-uses-react": "off",
|
|
@@ -39,7 +55,12 @@
|
|
|
39
55
|
"unused-imports/no-unused-imports": "warn",
|
|
40
56
|
"unused-imports/no-unused-vars": [
|
|
41
57
|
"warn",
|
|
42
|
-
{
|
|
58
|
+
{
|
|
59
|
+
"vars": "all",
|
|
60
|
+
"varsIgnorePattern": "^_",
|
|
61
|
+
"args": "after-used",
|
|
62
|
+
"argsIgnorePattern": "^_"
|
|
63
|
+
}
|
|
43
64
|
]
|
|
44
65
|
},
|
|
45
66
|
"settings": {
|
package/src/lib/index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"parser": "@typescript-eslint/parser",
|
|
3
|
-
"plugins": ["@typescript-eslint", "react", "react-hooks"],
|
|
3
|
+
"plugins": ["@typescript-eslint", "react", "react-hooks", "perfectionist"],
|
|
4
4
|
"extends": [
|
|
5
5
|
"eslint:recommended",
|
|
6
6
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
@@ -9,36 +9,37 @@
|
|
|
9
9
|
"prettier"
|
|
10
10
|
],
|
|
11
11
|
"rules": {
|
|
12
|
-
"
|
|
13
|
-
"no-console": [
|
|
14
|
-
"warn",
|
|
15
|
-
{
|
|
16
|
-
"allow": ["warn", "error", "assert"]
|
|
17
|
-
}
|
|
18
|
-
],
|
|
12
|
+
"arrow-body-style": "error",
|
|
19
13
|
"max-params": [
|
|
20
14
|
"error",
|
|
21
15
|
{
|
|
22
16
|
"max": 4
|
|
23
17
|
}
|
|
24
18
|
],
|
|
25
|
-
"
|
|
19
|
+
"no-console": [
|
|
20
|
+
"warn",
|
|
21
|
+
{
|
|
22
|
+
"allow": ["warn", "error", "assert"]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
26
25
|
"no-useless-rename": "error",
|
|
26
|
+
"no-var": "off",
|
|
27
|
+
|
|
28
|
+
"@typescript-eslint/ban-types": "off",
|
|
27
29
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
28
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
29
|
-
"@typescript-eslint/prefer-interface": "off",
|
|
30
30
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
31
|
-
"@typescript-eslint/
|
|
31
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
32
32
|
"@typescript-eslint/no-empty-function": "off",
|
|
33
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
34
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
35
|
-
"@typescript-eslint/camelcase": "off",
|
|
36
33
|
"@typescript-eslint/no-empty-interface": "off",
|
|
34
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
37
35
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
38
|
-
"@typescript-eslint/
|
|
39
|
-
"@typescript-eslint/
|
|
40
|
-
"
|
|
36
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
37
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
38
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
39
|
+
"@typescript-eslint/prefer-interface": "off",
|
|
40
|
+
|
|
41
41
|
"react/display-name": "off",
|
|
42
|
+
"react/jsx-boolean-value": "error",
|
|
42
43
|
"react/jsx-curly-brace-presence": "warn",
|
|
43
44
|
"react/jsx-fragments": "warn",
|
|
44
45
|
"react/jsx-sort-props": [
|
|
@@ -52,12 +53,48 @@
|
|
|
52
53
|
"reservedFirst": true
|
|
53
54
|
}
|
|
54
55
|
],
|
|
56
|
+
"react/prop-types": "off",
|
|
55
57
|
"react/react-in-jsx-scope": "off",
|
|
58
|
+
"react/self-closing-comp": "error",
|
|
59
|
+
"react-hooks/exhaustive-deps": "error",
|
|
56
60
|
"react-hooks/rules-of-hooks": "error",
|
|
57
|
-
|
|
61
|
+
|
|
62
|
+
"perfectionist/sort-array-includes": [
|
|
63
|
+
"error",
|
|
64
|
+
{
|
|
65
|
+
"type": "natural",
|
|
66
|
+
"order": "asc",
|
|
67
|
+
"spread-last": true
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"perfectionist/sort-intersection-types": [
|
|
71
|
+
"error",
|
|
72
|
+
{
|
|
73
|
+
"type": "natural",
|
|
74
|
+
"order": "asc"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"perfectionist/sort-named-exports": [
|
|
78
|
+
"error",
|
|
79
|
+
{
|
|
80
|
+
"type": "natural",
|
|
81
|
+
"order": "asc"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"perfectionist/sort-union-types": [
|
|
85
|
+
"error",
|
|
86
|
+
{
|
|
87
|
+
"type": "natural",
|
|
88
|
+
"order": "asc",
|
|
89
|
+
"nullable-last": true
|
|
90
|
+
}
|
|
91
|
+
]
|
|
58
92
|
},
|
|
59
93
|
"settings": {
|
|
60
|
-
"import/internal-regex": "^react$"
|
|
94
|
+
"import/internal-regex": "^react$",
|
|
95
|
+
"react": {
|
|
96
|
+
"version": "detect"
|
|
97
|
+
}
|
|
61
98
|
},
|
|
62
99
|
"env": {
|
|
63
100
|
"browser": true
|