|
1 | 1 | module.exports = { |
2 | | - parser: '@typescript-eslint/parser', |
| 2 | + parser: "@typescript-eslint/parser", |
3 | 3 | extends: [ |
4 | | - 'plugin:react/recommended', |
5 | | - 'plugin:@typescript-eslint/recommended', |
6 | | - 'plugin:react-hooks/recommended', |
7 | | - 'prettier', |
8 | | - 'plugin:prettier/recommended', |
| 4 | + "plugin:react/recommended", |
| 5 | + "plugin:@typescript-eslint/recommended", |
| 6 | + "plugin:react-hooks/recommended", |
| 7 | + "prettier", |
| 8 | + "plugin:prettier/recommended", |
9 | 9 | ], |
10 | | - plugins: ['@typescript-eslint', 'import', 'unused-imports'], |
| 10 | + plugins: ["@typescript-eslint", "import", "unused-imports"], |
11 | 11 | parserOptions: { |
12 | 12 | ecmaVersion: 2020, |
13 | | - sourceType: 'module', |
| 13 | + sourceType: "module", |
14 | 14 | ecmaFeatures: { |
15 | 15 | jsx: true, |
16 | 16 | }, |
17 | 17 | }, |
18 | 18 | rules: { |
19 | | - '@typescript-eslint/no-empty-interface': 'error', |
20 | | - '@typescript-eslint/explicit-module-boundary-types': 'off', |
21 | | - '@typescript-eslint/no-unused-vars': 'off', |
22 | | - '@typescript-eslint/no-var-requires': 'off', |
23 | | - '@typescript-eslint/padding-line-between-statements': [ |
24 | | - 'error', |
| 19 | + "@typescript-eslint/no-empty-interface": "error", |
| 20 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 21 | + "@typescript-eslint/no-unused-vars": "off", |
| 22 | + "@typescript-eslint/no-var-requires": "off", |
| 23 | + "@typescript-eslint/padding-line-between-statements": [ |
| 24 | + "error", |
25 | 25 | { |
26 | | - blankLine: 'always', |
27 | | - prev: ['const', 'let', 'var', 'export', 'interface', 'type'], |
28 | | - next: '*', |
| 26 | + blankLine: "always", |
| 27 | + prev: ["const", "let", "var", "export", "interface", "type"], |
| 28 | + next: "*", |
29 | 29 | }, |
30 | 30 | { |
31 | | - blankLine: 'any', |
32 | | - prev: ['const', 'let', 'var'], |
33 | | - next: ['const', 'let', 'var'], |
| 31 | + blankLine: "any", |
| 32 | + prev: ["const", "let", "var"], |
| 33 | + next: ["const", "let", "var"], |
34 | 34 | }, |
35 | | - { blankLine: 'always', prev: '*', next: ['interface', 'type'] }, |
| 35 | + { blankLine: "always", prev: "*", next: ["interface", "type"] }, |
36 | 36 | ], |
37 | | - 'import/order': [ |
38 | | - 'error', |
| 37 | + "import/order": [ |
| 38 | + "error", |
39 | 39 | { |
40 | | - 'newlines-between': 'always', |
| 40 | + "newlines-between": "always", |
41 | 41 | // alphabetize: { order: 'asc', caseInsensitive: true }, |
42 | 42 | // Custom groups for sorting |
43 | 43 | pathGroups: [ |
44 | | - '@/', |
45 | | - 'types', |
46 | | - 'config', |
47 | | - 'lib', |
48 | | - 'app', |
49 | | - 'components', |
50 | | - 'pages', |
51 | | - 'res', |
| 44 | + "@/", |
| 45 | + "types", |
| 46 | + "config", |
| 47 | + "lib", |
| 48 | + "app", |
| 49 | + "components", |
| 50 | + "pages", |
| 51 | + "res", |
52 | 52 | ].map(function (path) { |
53 | 53 | return { |
54 | | - pattern: path + '/**', |
55 | | - group: 'external', |
56 | | - position: 'after', |
57 | | - } |
| 54 | + pattern: path + "/**", |
| 55 | + group: "external", |
| 56 | + position: "after", |
| 57 | + }; |
58 | 58 | }), |
59 | | - pathGroupsExcludedImportTypes: ['builtin'], |
| 59 | + pathGroupsExcludedImportTypes: ["builtin"], |
60 | 60 | }, |
61 | 61 | ], |
62 | | - 'padding-line-between-statements': 'off', |
63 | | - 'prettier/prettier': 'error', |
64 | | - 'react/react-in-jsx-scope': 'off', |
65 | | - 'unused-imports/no-unused-imports-ts': 'error', |
66 | | - 'unused-imports/no-unused-vars-ts': [ |
67 | | - 'warn', |
| 62 | + "padding-line-between-statements": "off", |
| 63 | + "prettier/prettier": "error", |
| 64 | + "react/react-in-jsx-scope": "off", |
| 65 | + "unused-imports/no-unused-imports-ts": "error", |
| 66 | + "unused-imports/no-unused-vars-ts": [ |
| 67 | + "warn", |
68 | 68 | { |
69 | | - vars: 'all', |
70 | | - varsIgnorePattern: '^_', |
71 | | - args: 'after-used', |
72 | | - argsIgnorePattern: '^_', |
| 69 | + vars: "all", |
| 70 | + varsIgnorePattern: "^_", |
| 71 | + args: "after-used", |
| 72 | + argsIgnorePattern: "^_", |
73 | 73 | }, |
74 | 74 | ], |
75 | 75 | }, |
76 | 76 | settings: { |
77 | 77 | react: { |
78 | | - version: 'detect', |
| 78 | + version: "detect", |
79 | 79 | }, |
80 | 80 | }, |
81 | | -} |
| 81 | +}; |
0 commit comments