-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
85 lines (84 loc) · 2.63 KB
/
eslint.config.mjs
File metadata and controls
85 lines (84 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import eslint from '@eslint/js'
import { defineConfig } from 'eslint/config'
import globals from 'globals'
import tseslint from 'typescript-eslint'
import importPlugin from 'eslint-plugin-import'
import pluginPromise from 'eslint-plugin-promise'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
export default defineConfig(
eslint.configs.recommended,
tseslint.configs.strictTypeChecked,
importPlugin.flatConfigs.typescript,
pluginPromise.configs['flat/recommended'],
eslintPluginPrettierRecommended,
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'**/*.js',
],
},
{
languageOptions: {
globals: {
...globals.webextensions,
},
parserOptions: {
project: './tsconfig.json',
},
},
files: ['**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/require-await': 'off',
'comma-dangle': ['error', 'always-multiline'],
'handle-callback-err': ['error', '^(err|error)$'],
'no-catch-shadow': 'error',
'no-underscore-dangle': 'off',
'object-curly-spacing': ['error', 'always'],
'max-classes-per-file': 'off',
'no-unused-vars': 'off',
'no-multi-assign': 'off',
'lines-between-class-members': 'off',
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'no-shadow': 'off',
'prefer-destructuring': 'off',
'no-continue': 'off',
'no-use-before-define': 'off',
'no-dupe-class-members': 'off',
'func-names': 'off',
'space-before-function-paren': 'off',
'no-lonely-if': 'off',
'no-param-reassign': ['error', { props: false }],
'no-redeclare': 'off',
'no-restricted-syntax': 'off',
'no-await-in-loop': 'off',
'no-console': 'warn',
'prettier/prettier': 'warn',
'import/no-extraneous-dependencies': 'off',
},
},
)