@xaliksss/eslint-config 3.0.1 → 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.
Files changed (2) hide show
  1. package/eslint.config.js +41 -21
  2. package/package.json +5 -4
package/eslint.config.js CHANGED
@@ -1,8 +1,7 @@
1
- import tseslint from "typescript-eslint";
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": [
@@ -132,18 +131,40 @@ const jsRules = {
132
131
  "operator-assignment": ["error", "always"],
133
132
  "max-params": ["error", { max: 5 }],
134
133
 
135
- // "import/export": "error",
136
- // "import/no-deprecated": "error",
137
- // "import/no-empty-named-blocks": "error",
138
- // "import/no-extraneous-dependencies": "error",
139
- // "import/no-mutable-exports": "error",
140
- // "import/no-named-as-default-member": "error",
141
- // "import/no-amd": "error",
142
- // "import/no-import-module-exports": "error",
143
- // "import/unambiguous": "error",
144
- // "import/default": "error", // Под вопросом
145
- // "import/named": "error", // Под вопросом
146
- // "import/no-duplicates": "error",
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,14 +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
197
  "tseslint/no-for-in-array": "error",
178
- "tseslint/no-import-type-side-effects": "error",
198
+ // "tseslint/no-import-type-side-effects": "error", // import/consistent-type-specifier-style
179
199
  "tseslint/no-inferrable-types": "error",
180
200
  "tseslint/no-invalid-void-type": "error",
181
201
  "tseslint/no-meaningless-void-operator": "error",
@@ -311,7 +331,7 @@ export default tseslint.config(
311
331
  // TypeScript
312
332
  {
313
333
  files: ["**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx"],
314
- ignores: ["dist/**/*"],
334
+ ignores: ["**/dist/**"],
315
335
 
316
336
  languageOptions: {
317
337
  parserOptions: { project: true },
@@ -323,7 +343,7 @@ export default tseslint.config(
323
343
  plugins: {
324
344
  tseslint: tseslint.plugin,
325
345
  prettier,
326
- // import: importPlugin,
346
+ import: importPlugin,
327
347
  },
328
348
 
329
349
  rules: tsRules,
@@ -331,7 +351,7 @@ export default tseslint.config(
331
351
  // JavaScript
332
352
  {
333
353
  files: ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.jsx"],
334
- ignores: ["dist/**/*"],
354
+ ignores: ["**/dist/**"],
335
355
 
336
356
  languageOptions: {
337
357
  ecmaVersion: "latest",
@@ -341,7 +361,7 @@ export default tseslint.config(
341
361
 
342
362
  plugins: {
343
363
  prettier,
344
- // import: importPlugin,
364
+ import: importPlugin,
345
365
  },
346
366
 
347
367
  rules: jsRules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaliksss/eslint-config",
3
- "version": "3.0.1",
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.9.0",
24
- "typescript-eslint": "^8.2.0"
24
+ "globals": "^15.11.0",
25
+ "typescript-eslint": "^8.11.0"
25
26
  },
26
27
  "peerDependencies": {
27
- "eslint": "^9.9.0",
28
+ "eslint": "^9.13.0",
28
29
  "prettier": "^3.3.3"
29
30
  }
30
31
  }