@dr.pogodin/eslint-configs 0.0.6 → 0.0.7
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/config/javascript.js +15 -0
- package/package.json +6 -6
package/config/javascript.js
CHANGED
|
@@ -71,6 +71,9 @@ export default defineConfig([{
|
|
|
71
71
|
'import/no-unused-modules': 'error',
|
|
72
72
|
'import/no-useless-path-segments': 'error',
|
|
73
73
|
'import/no-webpack-loader-syntax': 'error',
|
|
74
|
+
'import/order': ['error', {
|
|
75
|
+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
|
76
|
+
}],
|
|
74
77
|
|
|
75
78
|
// These rules are provided by "@stylistic/eslint-plugin",
|
|
76
79
|
// and (re-)configured for our taste, somewhat differently from
|
|
@@ -224,6 +227,7 @@ export default defineConfig([{
|
|
|
224
227
|
'no-shadow': 'error',
|
|
225
228
|
'no-template-curly-in-string': 'error',
|
|
226
229
|
'no-throw-literal': 'error',
|
|
230
|
+
'no-unassigned-vars': 'error',
|
|
227
231
|
'no-undef-init': 'error',
|
|
228
232
|
'no-underscore-dangle': 'error',
|
|
229
233
|
'no-unmodified-loop-condition': 'error',
|
|
@@ -258,6 +262,17 @@ export default defineConfig([{
|
|
|
258
262
|
'require-atomic-updates': 'error',
|
|
259
263
|
'require-await': 'error',
|
|
260
264
|
'require-yield': 'error',
|
|
265
|
+
|
|
266
|
+
// TODO: Disabled for now, as there is one thing I don't like about it:
|
|
267
|
+
// in TypeScript it sorts type imports together with other imported members,
|
|
268
|
+
// while I'd prefer to have all type member imports first, followed by other
|
|
269
|
+
// imported members after.
|
|
270
|
+
/*
|
|
271
|
+
'sort-imports': ['error', {
|
|
272
|
+
ignoreDeclarationSort: true,
|
|
273
|
+
}],
|
|
274
|
+
*/
|
|
275
|
+
|
|
261
276
|
'sort-keys': ['error', 'asc', {
|
|
262
277
|
allowLineSeparatedGroups: true,
|
|
263
278
|
}],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dr.pogodin/eslint-configs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "ESLint configurations for TypeScript and/or React projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./config/index.js",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"@babel/preset-env": "^7.27.2",
|
|
35
35
|
"@babel/preset-react": "^7.27.1",
|
|
36
36
|
"@babel/preset-typescript": "^7.27.1",
|
|
37
|
-
"@eslint/js": "^9.
|
|
38
|
-
"@stylistic/eslint-plugin": "^4.
|
|
39
|
-
"eslint": "^9.
|
|
40
|
-
"eslint-import-resolver-typescript": "^4.3.
|
|
37
|
+
"@eslint/js": "^9.27.0",
|
|
38
|
+
"@stylistic/eslint-plugin": "^4.4.0",
|
|
39
|
+
"eslint": "^9.27.0",
|
|
40
|
+
"eslint-import-resolver-typescript": "^4.3.5",
|
|
41
41
|
"eslint-plugin-import": "^2.31.0",
|
|
42
42
|
"eslint-plugin-jest": "^28.11.0",
|
|
43
43
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
44
44
|
"eslint-plugin-react": "^7.37.4",
|
|
45
45
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
46
|
"typescript": "^5.7.0",
|
|
47
|
-
"typescript-eslint": "^8.32.
|
|
47
|
+
"typescript-eslint": "^8.32.1"
|
|
48
48
|
}
|
|
49
49
|
}
|