|
| 1 | +import type { ConfigWithExtendsArray } from "@eslint/config-helpers"; |
| 2 | + |
1 | 3 | import eslint from "@eslint/js"; |
| 4 | +import gitignore from "eslint-config-flat-gitignore"; |
2 | 5 | import { flatConfigs } from "eslint-plugin-import-x"; |
3 | 6 | import perfectionist from "eslint-plugin-perfectionist"; |
4 | 7 | import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; |
5 | 8 | import { defineConfig } from "eslint/config"; |
6 | 9 | import { configs } from "typescript-eslint"; |
7 | 10 |
|
| 11 | +/* -------------------------------------------------------------------------- */ |
| 12 | +/* Настройка eslint для проекта */ |
| 13 | +/* -------------------------------------------------------------------------- */ |
| 14 | + |
8 | 15 | export default defineConfig( |
9 | | - { ignores: ["**/dist"] }, |
10 | | - { |
11 | | - rules: { |
12 | | - "@typescript-eslint/no-use-before-define": ["error", "nofunc"], |
13 | | - "import-x/no-extraneous-dependencies": [ |
14 | | - "error", |
15 | | - { |
16 | | - devDependencies: ["**/eslint.config.ts"], |
17 | | - optionalDependencies: false, |
18 | | - }, |
19 | | - ], |
20 | | - "no-use-before-define": "off", |
21 | | - }, |
22 | | - }, |
| 16 | + gitignore(), |
23 | 17 | { |
24 | 18 | languageOptions: { |
25 | 19 | parserOptions: { |
26 | 20 | projectService: { allowDefaultProject: ["eslint.config.ts"] }, |
27 | | - tsconfigRootDir: import.meta.dirname, |
28 | 21 | }, |
29 | 22 | }, |
30 | 23 | }, |
31 | 24 | eslint.configs.recommended, |
32 | | - //@ts-expect-error Argument of type 'PluginFlatConfig' is not assignable to parameter of type 'InfiniteArray<ConfigWithExtends>'. |
33 | | - flatConfigs.recommended, |
34 | | - flatConfigs.typescript, |
| 25 | + flatConfigs.recommended as ConfigWithExtendsArray, |
| 26 | + flatConfigs.typescript as ConfigWithExtendsArray, |
35 | 27 | configs.strictTypeChecked, |
36 | 28 | configs.stylisticTypeChecked, |
37 | 29 | perfectionist.configs["recommended-natural"], |
|
0 commit comments