@xaliksss/eslint-config 3.0.0 → 3.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/eslint.config.js +42 -23
- package/package.json +5 -4
package/eslint.config.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import importPlugin from "eslint-plugin-import";
|
|
2
2
|
import prettier from "eslint-plugin-prettier";
|
|
3
|
-
// Ждем https://github.com/import-js/eslint-plugin-import/pull/2996
|
|
4
|
-
// import importPlugin from "eslint-plugin-import";
|
|
5
3
|
import globals from "globals";
|
|
4
|
+
import tseslint from "typescript-eslint";
|
|
6
5
|
|
|
7
6
|
const jsRules = {
|
|
8
7
|
"prettier/prettier": [
|
|
@@ -10,7 +9,7 @@ const jsRules = {
|
|
|
10
9
|
{
|
|
11
10
|
useTabs: true,
|
|
12
11
|
endOfLine: "auto",
|
|
13
|
-
printWidth:
|
|
12
|
+
printWidth: 115,
|
|
14
13
|
},
|
|
15
14
|
],
|
|
16
15
|
|
|
@@ -132,18 +131,40 @@ const jsRules = {
|
|
|
132
131
|
"operator-assignment": ["error", "always"],
|
|
133
132
|
"max-params": ["error", { max: 5 }],
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
134
|
+
"import/export": "error",
|
|
135
|
+
"import/no-deprecated": "error",
|
|
136
|
+
"import/no-empty-named-blocks": "error",
|
|
137
|
+
"import/no-extraneous-dependencies": "error",
|
|
138
|
+
"import/no-mutable-exports": "error",
|
|
139
|
+
"import/no-named-as-default-member": "error",
|
|
140
|
+
"import/no-unused-modules": "error", // ПОЧЕМУ ТО ПРИ { "unusedExports": true } ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
|
|
141
|
+
"import/no-amd": "error",
|
|
142
|
+
"import/no-commonjs": "error",
|
|
143
|
+
"import/no-import-module-exports": "error",
|
|
144
|
+
"import/unambiguous": "error",
|
|
145
|
+
"import/default": "error", // Под вопросом
|
|
146
|
+
"import/named": "error", // Под вопросом
|
|
147
|
+
"import/namespace": "error",
|
|
148
|
+
"import/no-absolute-path": "error",
|
|
149
|
+
"import/no-dynamic-require": "error",
|
|
150
|
+
"import/no-self-import": "error",
|
|
151
|
+
"import/no-useless-path-segments": "error",
|
|
152
|
+
"import/no-webpack-loader-syntax": "error",
|
|
153
|
+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
154
|
+
"import/first": "error",
|
|
155
|
+
"import/newline-after-import": ["error", { count: 1, considerComments: false }],
|
|
156
|
+
"import/no-anonymous-default-export": "error",
|
|
157
|
+
"import/no-duplicates": "error",
|
|
158
|
+
"import/no-named-default": "error",
|
|
159
|
+
"import/order": [
|
|
160
|
+
"error",
|
|
161
|
+
{
|
|
162
|
+
groups: ["builtin", "external", "type", "internal", "parent", "sibling", "index", "object"],
|
|
163
|
+
"newlines-between": "always",
|
|
164
|
+
named: true,
|
|
165
|
+
alphabetize: { order: "asc" },
|
|
166
|
+
},
|
|
167
|
+
],
|
|
147
168
|
};
|
|
148
169
|
|
|
149
170
|
// https://typescript-eslint.io/rules/?=xdeprecated
|
|
@@ -168,15 +189,13 @@ const tsRules = {
|
|
|
168
189
|
"tseslint/no-array-delete": "error",
|
|
169
190
|
"tseslint/no-base-to-string": "error",
|
|
170
191
|
"tseslint/no-confusing-non-null-assertion": "error",
|
|
171
|
-
"tseslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
|
|
172
192
|
"tseslint/no-duplicate-enum-values": "error",
|
|
173
193
|
"tseslint/no-duplicate-type-constituents": "error",
|
|
174
194
|
"tseslint/no-empty-interface": "error",
|
|
175
195
|
"tseslint/no-empty-object-type": "error",
|
|
176
196
|
"tseslint/no-extra-non-null-assertion": "error",
|
|
177
|
-
"tseslint/no-floating-promises": "error",
|
|
178
197
|
"tseslint/no-for-in-array": "error",
|
|
179
|
-
"tseslint/no-import-type-side-effects": "error",
|
|
198
|
+
// "tseslint/no-import-type-side-effects": "error", // import/consistent-type-specifier-style
|
|
180
199
|
"tseslint/no-inferrable-types": "error",
|
|
181
200
|
"tseslint/no-invalid-void-type": "error",
|
|
182
201
|
"tseslint/no-meaningless-void-operator": "error",
|
|
@@ -312,7 +331,7 @@ export default tseslint.config(
|
|
|
312
331
|
// TypeScript
|
|
313
332
|
{
|
|
314
333
|
files: ["**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx"],
|
|
315
|
-
ignores: ["dist
|
|
334
|
+
ignores: ["**/dist/**"],
|
|
316
335
|
|
|
317
336
|
languageOptions: {
|
|
318
337
|
parserOptions: { project: true },
|
|
@@ -324,7 +343,7 @@ export default tseslint.config(
|
|
|
324
343
|
plugins: {
|
|
325
344
|
tseslint: tseslint.plugin,
|
|
326
345
|
prettier,
|
|
327
|
-
|
|
346
|
+
import: importPlugin,
|
|
328
347
|
},
|
|
329
348
|
|
|
330
349
|
rules: tsRules,
|
|
@@ -332,7 +351,7 @@ export default tseslint.config(
|
|
|
332
351
|
// JavaScript
|
|
333
352
|
{
|
|
334
353
|
files: ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.jsx"],
|
|
335
|
-
ignores: ["dist
|
|
354
|
+
ignores: ["**/dist/**"],
|
|
336
355
|
|
|
337
356
|
languageOptions: {
|
|
338
357
|
ecmaVersion: "latest",
|
|
@@ -342,7 +361,7 @@ export default tseslint.config(
|
|
|
342
361
|
|
|
343
362
|
plugins: {
|
|
344
363
|
prettier,
|
|
345
|
-
|
|
364
|
+
import: importPlugin,
|
|
346
365
|
},
|
|
347
366
|
|
|
348
367
|
rules: jsRules,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaliksss/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"eslint-plugin-import": "^2.31.0",
|
|
22
23
|
"eslint-plugin-prettier": "^5.2.1",
|
|
23
|
-
"globals": "^15.
|
|
24
|
-
"typescript-eslint": "^8.
|
|
24
|
+
"globals": "^15.11.0",
|
|
25
|
+
"typescript-eslint": "^8.11.0"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
|
-
"eslint": "^9.
|
|
28
|
+
"eslint": "^9.13.0",
|
|
28
29
|
"prettier": "^3.3.3"
|
|
29
30
|
}
|
|
30
31
|
}
|