@cargosense/eslint-config 5.0.0 → 6.1.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/index.js +33 -33
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -27,19 +27,40 @@ export default defineConfig([
|
|
|
27
27
|
},
|
|
28
28
|
|
|
29
29
|
rules: {
|
|
30
|
+
/**
|
|
31
|
+
* Enforce sorted import declarations within modules.
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://eslint.org/docs/latest/rules/sort-imports}
|
|
34
|
+
*/
|
|
35
|
+
"sort-imports": ["error", {
|
|
36
|
+
allowSeparatedGroups: true,
|
|
37
|
+
ignoreCase: true,
|
|
38
|
+
}],
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Require object keys to be sorted.
|
|
42
|
+
*
|
|
43
|
+
* @see {@link https://eslint.org/docs/latest/rules/sort-keys}
|
|
44
|
+
*/
|
|
45
|
+
"sort-keys": ["error", "asc", {
|
|
46
|
+
allowLineSeparatedGroups: true,
|
|
47
|
+
caseSensitive: false,
|
|
48
|
+
natural: true,
|
|
49
|
+
}],
|
|
50
|
+
|
|
30
51
|
/**
|
|
31
52
|
* Enforce consistent line breaks between array elements.
|
|
32
53
|
*
|
|
33
54
|
* @see {@link https://eslint.style/rules/default/array-element-newline}
|
|
34
55
|
*/
|
|
35
|
-
"
|
|
56
|
+
"stylistic/array-element-newline": ["error", "consistent"],
|
|
36
57
|
|
|
37
58
|
/**
|
|
38
59
|
* Enforce consistent brace style for blocks.
|
|
39
60
|
*
|
|
40
61
|
* @see {@link https://eslint.style/rules/default/brace-style}
|
|
41
62
|
*/
|
|
42
|
-
"
|
|
63
|
+
"stylistic/brace-style": ["error", "1tbs"],
|
|
43
64
|
|
|
44
65
|
/**
|
|
45
66
|
* Enforce consistent usage of line breaks between arguments of a function
|
|
@@ -47,7 +68,7 @@ export default defineConfig([
|
|
|
47
68
|
*
|
|
48
69
|
* @see {@link https://eslint.style/rules/js/function-call-argument-newline}
|
|
49
70
|
*/
|
|
50
|
-
"
|
|
71
|
+
"stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
51
72
|
|
|
52
73
|
/**
|
|
53
74
|
* Disallow spaces between the function name and the opening parenthesis
|
|
@@ -55,7 +76,7 @@ export default defineConfig([
|
|
|
55
76
|
*
|
|
56
77
|
* @see {@link https://eslint.style/rules/default/function-call-spacing}
|
|
57
78
|
*/
|
|
58
|
-
"
|
|
79
|
+
"stylistic/function-call-spacing": "error",
|
|
59
80
|
|
|
60
81
|
/**
|
|
61
82
|
* Enforce a consistent location for an arrow function containing an
|
|
@@ -63,7 +84,7 @@ export default defineConfig([
|
|
|
63
84
|
*
|
|
64
85
|
* @see {@link https://eslint.style/rules/default/implicit-arrow-linebreak}
|
|
65
86
|
*/
|
|
66
|
-
"
|
|
87
|
+
"stylistic/implicit-arrow-linebreak": "error",
|
|
67
88
|
|
|
68
89
|
/**
|
|
69
90
|
* Enforce a maximum line length to increase code readability and
|
|
@@ -71,7 +92,7 @@ export default defineConfig([
|
|
|
71
92
|
*
|
|
72
93
|
* @see {@link https://eslint.style/rules/default/max-len}
|
|
73
94
|
*/
|
|
74
|
-
"
|
|
95
|
+
"stylistic/max-len": ["warn", {
|
|
75
96
|
code: 120,
|
|
76
97
|
comments: 80,
|
|
77
98
|
ignoreUrls: true,
|
|
@@ -83,28 +104,28 @@ export default defineConfig([
|
|
|
83
104
|
*
|
|
84
105
|
* @see {@link https://eslint.style/rules/default/no-confusing-arrow}
|
|
85
106
|
*/
|
|
86
|
-
"
|
|
107
|
+
"stylistic/no-confusing-arrow": "warn",
|
|
87
108
|
|
|
88
109
|
/**
|
|
89
110
|
* Disallow unnecessary semicolons.
|
|
90
111
|
*
|
|
91
112
|
* @see {@link https://eslint.style/rules/default/no-extra-semi}
|
|
92
113
|
*/
|
|
93
|
-
"
|
|
114
|
+
"stylistic/no-extra-semi": "error",
|
|
94
115
|
|
|
95
116
|
/**
|
|
96
117
|
* Enforce a consistent linebreak style for operators.
|
|
97
118
|
*
|
|
98
119
|
* @see {@link https://eslint.style/rules/default/operator-linebreak}
|
|
99
120
|
*/
|
|
100
|
-
"
|
|
121
|
+
"stylistic/operator-linebreak": ["error", "after"],
|
|
101
122
|
|
|
102
123
|
/**
|
|
103
124
|
* Enforce the consistent use of quotes.
|
|
104
125
|
*
|
|
105
126
|
* @see {@link https://eslint.style/rules/default/quotes}
|
|
106
127
|
*/
|
|
107
|
-
"
|
|
128
|
+
"stylistic/quotes": ["error", "double", {
|
|
108
129
|
allowTemplateLiterals: "avoidEscape",
|
|
109
130
|
avoidEscape: true,
|
|
110
131
|
}],
|
|
@@ -114,7 +135,7 @@ export default defineConfig([
|
|
|
114
135
|
*
|
|
115
136
|
* @see {@link https://eslint.style/rules/default/semi}
|
|
116
137
|
*/
|
|
117
|
-
"
|
|
138
|
+
"stylistic/semi": ["error", "always"],
|
|
118
139
|
|
|
119
140
|
/**
|
|
120
141
|
* Control spacing around colons of `case` and `default` clauses in switch
|
|
@@ -122,28 +143,7 @@ export default defineConfig([
|
|
|
122
143
|
*
|
|
123
144
|
* @see {@link https://eslint.style/rules/default/switch-colon-spacing}
|
|
124
145
|
*/
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Enforce sorted import declarations within modules.
|
|
129
|
-
*
|
|
130
|
-
* @see {@link https://eslint.org/docs/latest/rules/sort-imports}
|
|
131
|
-
*/
|
|
132
|
-
"sort-imports": ["error", {
|
|
133
|
-
allowSeparatedGroups: true,
|
|
134
|
-
ignoreCase: true,
|
|
135
|
-
}],
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Require object keys to be sorted.
|
|
139
|
-
*
|
|
140
|
-
* @see {@link https://eslint.org/docs/latest/rules/sort-keys}
|
|
141
|
-
*/
|
|
142
|
-
"sort-keys": ["error", "asc", {
|
|
143
|
-
allowLineSeparatedGroups: true,
|
|
144
|
-
caseSensitive: false,
|
|
145
|
-
natural: true,
|
|
146
|
-
}],
|
|
146
|
+
"stylistic/switch-colon-spacing": "error",
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
149
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name" :"@cargosense/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Shareable ESLint configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"test": "NODE_V8_COVERAGE=coverage node --experimental-test-coverage --test"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@eslint/compat": "^
|
|
27
|
-
"@eslint/js": "^
|
|
28
|
-
"@stylistic/eslint-plugin": "^5.
|
|
26
|
+
"@eslint/compat": "^2.0.2",
|
|
27
|
+
"@eslint/js": "^10.0.1",
|
|
28
|
+
"@stylistic/eslint-plugin": "^5.9.0",
|
|
29
29
|
"eslint-plugin-array-func": "^5.1.0",
|
|
30
30
|
"eslint-plugin-sort-class-members": "^1.21.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"eslint": "^
|
|
33
|
+
"eslint": "^10.0.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"eslint": ">=
|
|
36
|
+
"eslint": ">=10.0.1"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": "^20.
|
|
39
|
+
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public",
|