|
1 | | -import eslint from '@eslint/js'; |
2 | | -import prettierPlugin from 'eslint-plugin-prettier'; |
3 | | -import unusedImportsPlugin from 'eslint-plugin-unused-imports'; |
| 1 | +import eslint from "@eslint/js"; |
| 2 | +import prettierPlugin from "eslint-plugin-prettier"; |
| 3 | +import unusedImportsPlugin from "eslint-plugin-unused-imports"; |
4 | 4 |
|
5 | | -import prettierExtends from 'eslint-config-prettier'; |
6 | | -import { fixupPluginRules } from '@eslint/compat'; |
7 | | -import globals from 'globals'; |
8 | | -import tseslint from 'typescript-eslint'; |
| 5 | +import prettierExtends from "eslint-config-prettier"; |
| 6 | +import { fixupPluginRules } from "@eslint/compat"; |
| 7 | +import globals from "globals"; |
| 8 | +import tseslint from "typescript-eslint"; |
9 | 9 |
|
10 | 10 | const globalToUse = { |
11 | | - ...globals.browser, |
12 | | - ...globals.serviceworker, |
13 | | - ...globals.es2021, |
14 | | - ...globals.worker, |
15 | | - ...globals.node, |
| 11 | + ...globals.browser, |
| 12 | + ...globals.serviceworker, |
| 13 | + ...globals.es2021, |
| 14 | + ...globals.worker, |
| 15 | + ...globals.node, |
16 | 16 | }; |
17 | 17 |
|
18 | 18 | export default tseslint.config({ |
19 | | - extends: [ |
20 | | - { |
21 | | - ignores: ['dist/**', 'bin/**'], |
22 | | - }, |
23 | | - prettierExtends, |
24 | | - eslint.configs.recommended, |
25 | | - ...tseslint.configs.recommended, |
26 | | - ], |
27 | | - plugins: { |
28 | | - prettierPlugin, |
29 | | - 'unused-imports': fixupPluginRules(unusedImportsPlugin), |
30 | | - }, |
31 | | - rules: { |
32 | | - '@typescript-eslint/no-this-alias': 'off', |
33 | | - '@typescript-eslint/no-unused-expressions': 'off', |
34 | | - 'no-useless-escape': 'off', |
35 | | - 'no-prototype-builtins': 'off', |
36 | | - 'no-undef': 'off', |
37 | | - '@typescript-eslint/no-require-imports': 'off', |
38 | | - '@typescript-eslint/no-unused-vars': 'off', |
39 | | - indent: [ |
40 | | - 'error', |
41 | | - 'tab', |
42 | | - { |
43 | | - SwitchCase: 1, |
44 | | - }, |
45 | | - ], |
46 | | - 'linebreak-style': [ |
47 | | - 'error', |
48 | | - process.platform === 'win32' ? 'windows' : 'unix', |
49 | | - ], |
50 | | - quotes: ['error', 'single'], |
51 | | - semi: ['error', 'always'], |
52 | | - '@typescript-eslint/ban-ts-comment': 'off', |
53 | | - '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], |
54 | | - '@typescript-eslint/consistent-type-imports': [ |
55 | | - 'error', |
56 | | - { |
57 | | - prefer: 'type-imports', |
58 | | - }, |
59 | | - ], |
60 | | - '@typescript-eslint/no-explicit-any': 'off', |
61 | | - }, |
62 | | - languageOptions: { |
63 | | - globals: globalToUse, |
64 | | - parserOptions: { |
65 | | - ecmaFeatures: { |
66 | | - jsx: true, |
67 | | - }, |
68 | | - }, |
69 | | - }, |
| 19 | + extends: [ |
| 20 | + { |
| 21 | + ignores: ["dist/**", "bin/**", "docs/**", ".yarn/**"], |
| 22 | + }, |
| 23 | + prettierExtends, |
| 24 | + eslint.configs.recommended, |
| 25 | + ...tseslint.configs.recommended, |
| 26 | + ], |
| 27 | + plugins: { |
| 28 | + prettierPlugin, |
| 29 | + "unused-imports": fixupPluginRules(unusedImportsPlugin), |
| 30 | + }, |
| 31 | + rules: { |
| 32 | + "@typescript-eslint/no-this-alias": "off", |
| 33 | + "@typescript-eslint/no-unused-expressions": "off", |
| 34 | + "no-useless-escape": "off", |
| 35 | + "no-prototype-builtins": "off", |
| 36 | + "no-undef": "off", |
| 37 | + "@typescript-eslint/no-require-imports": "off", |
| 38 | + "@typescript-eslint/no-unused-vars": "off", |
| 39 | + "linebreak-style": [ |
| 40 | + "error", |
| 41 | + process.platform === "win32" ? "windows" : "unix", |
| 42 | + ], |
| 43 | + quotes: ["error", "double"], |
| 44 | + semi: ["error", "always"], |
| 45 | + "@typescript-eslint/ban-ts-comment": "off", |
| 46 | + "@typescript-eslint/consistent-type-definitions": ["error", "interface"], |
| 47 | + "@typescript-eslint/consistent-type-imports": [ |
| 48 | + "error", |
| 49 | + { |
| 50 | + prefer: "type-imports", |
| 51 | + }, |
| 52 | + ], |
| 53 | + "@typescript-eslint/no-explicit-any": "off", |
| 54 | + }, |
| 55 | + languageOptions: { |
| 56 | + globals: globalToUse, |
| 57 | + parserOptions: { |
| 58 | + ecmaFeatures: { |
| 59 | + jsx: true, |
| 60 | + }, |
| 61 | + }, |
| 62 | + }, |
70 | 63 | }); |
0 commit comments