|
1 | 1 | // eslint.config.js |
2 | | -import js from "@eslint/js"; |
3 | | -import pluginImport from "eslint-plugin-import"; |
4 | | -import prettierRecommended from "eslint-plugin-prettier/recommended"; |
5 | | -import pluginPromise from "eslint-plugin-promise"; |
6 | | -import pluginUnusedImports from "eslint-plugin-unused-imports"; |
7 | | -import ts from "typescript-eslint"; |
| 2 | +import js from '@eslint/js'; |
| 3 | +import pluginImport from 'eslint-plugin-import'; |
| 4 | +import prettierRecommended from 'eslint-plugin-prettier/recommended'; |
| 5 | +import pluginPromise from 'eslint-plugin-promise'; |
| 6 | +import pluginUnusedImports from 'eslint-plugin-unused-imports'; |
| 7 | +import ts from 'typescript-eslint'; |
8 | 8 |
|
9 | 9 | export default ts.config( |
10 | 10 | js.configs.recommended, |
11 | 11 | ts.configs.recommended, |
12 | 12 | prettierRecommended, |
13 | | - pluginPromise.configs["flat/recommended"], |
| 13 | + pluginPromise.configs['flat/recommended'], |
14 | 14 | { |
15 | 15 | plugins: { |
16 | 16 | import: pluginImport, |
17 | | - "unused-imports": pluginUnusedImports, |
| 17 | + 'unused-imports': pluginUnusedImports, |
18 | 18 | }, |
19 | 19 | rules: { |
20 | | - "@typescript-eslint/no-explicit-any": "warn", |
21 | | - "@typescript-eslint/no-unused-vars": "off", // turned off in favor of unused-imports/no-unused-vars |
22 | | - "@typescript-eslint/no-require-imports": "warn", |
| 20 | + '@typescript-eslint/no-explicit-any': 'warn', |
| 21 | + '@typescript-eslint/no-unused-vars': 'off', // turned off in favor of unused-imports/no-unused-vars |
| 22 | + '@typescript-eslint/no-require-imports': 'warn', |
23 | 23 |
|
24 | 24 | // Remove unused imports |
25 | | - "unused-imports/no-unused-imports": "error", |
26 | | - "unused-imports/no-unused-vars": [ |
27 | | - "error", |
| 25 | + 'unused-imports/no-unused-imports': 'error', |
| 26 | + 'unused-imports/no-unused-vars': [ |
| 27 | + 'error', |
28 | 28 | { |
29 | | - vars: "all", |
30 | | - varsIgnorePattern: "^_", |
31 | | - args: "after-used", |
32 | | - argsIgnorePattern: "^_", |
| 29 | + vars: 'all', |
| 30 | + varsIgnorePattern: '^_', |
| 31 | + args: 'after-used', |
| 32 | + argsIgnorePattern: '^_', |
33 | 33 | }, |
34 | 34 | ], |
35 | 35 |
|
36 | 36 | // Import organization |
37 | | - "import/order": [ |
38 | | - "error", |
| 37 | + 'import/order': [ |
| 38 | + 'error', |
39 | 39 | { |
40 | 40 | groups: [ |
41 | | - "builtin", |
42 | | - "external", |
43 | | - "internal", |
44 | | - "parent", |
45 | | - "sibling", |
46 | | - "index", |
47 | | - "object", |
48 | | - "type", |
| 41 | + 'builtin', |
| 42 | + 'external', |
| 43 | + 'internal', |
| 44 | + 'parent', |
| 45 | + 'sibling', |
| 46 | + 'index', |
| 47 | + 'object', |
| 48 | + 'type', |
49 | 49 | ], |
50 | | - "newlines-between": "always", |
51 | | - alphabetize: { order: "asc", caseInsensitive: true }, |
| 50 | + 'newlines-between': 'always', |
| 51 | + alphabetize: { order: 'asc', caseInsensitive: true }, |
52 | 52 | warnOnUnassignedImports: true, |
53 | 53 | }, |
54 | 54 | ], |
55 | | - "import/no-duplicates": "error", |
| 55 | + 'import/no-duplicates': 'error', |
56 | 56 | }, |
57 | 57 | settings: { |
58 | | - "import/parsers": { |
59 | | - "@typescript-eslint/parser": [".ts", ".tsx"], |
| 58 | + 'import/parsers': { |
| 59 | + '@typescript-eslint/parser': ['.ts', '.tsx'], |
60 | 60 | }, |
61 | | - "import/resolver": { |
| 61 | + 'import/resolver': { |
62 | 62 | typescript: { |
63 | 63 | alwaysTryTypes: true, |
64 | | - project: ["./packages/*/tsconfig.json"], |
| 64 | + project: ['./packages/*/tsconfig.json'], |
65 | 65 | }, |
66 | 66 | }, |
67 | 67 | }, |
68 | 68 | }, |
69 | 69 | { |
70 | 70 | ignores: [ |
71 | | - "**/dist", |
72 | | - "**/_doNotUse", |
73 | | - "**/node_modules", |
74 | | - "**/.vinxi", |
75 | | - "**/.output", |
76 | | - "**/pnpm-lock.yaml", |
77 | | - "**/routeTree.gen.ts", |
| 71 | + '**/dist', |
| 72 | + '**/_doNotUse', |
| 73 | + '**/node_modules', |
| 74 | + '**/.vinxi', |
| 75 | + '**/.output', |
| 76 | + '**/pnpm-lock.yaml', |
| 77 | + '**/routeTree.gen.ts', |
78 | 78 | ], |
79 | 79 | }, |
80 | 80 | ); |
0 commit comments