-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
58 lines (55 loc) · 1.78 KB
/
eslint.config.mjs
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
// @ts-check
import globals from 'globals';
import eslintJs from '@eslint/js';
import eslintTs from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.Config} */
const eslintConfigPrettierTypeForced = (() => {
/** @type {any} */
const eslintConfigPrettierAsAny = eslintConfigPrettier;
return eslintConfigPrettierAsAny;
})();
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
export default [
eslintJs.configs.recommended,
...eslintTs.configs.recommended,
eslintConfigPrettierTypeForced,
{
files: ['**/*.{ts,ts,tsx,js,mjs,jsx}'],
plugins: {},
languageOptions: {
globals: { ...globals.browser },
parser: eslintTs.parser,
ecmaVersion: 5,
sourceType: 'script',
},
/** @type {Partial<import("eslint/rules").ESLintRules>} */
rules: {
['no-shadow']: 'off',
['comma-dangle']: 'off',
['radix']: 'off',
['no-use-before-define']: 'off',
['no-constant-condition']: 'off',
['no-unused-vars']: 'off',
['no-unused-expressions']: 'off',
['no-await-in-loop']: 'off',
['no-empty']: 'off',
['no-continue']: 'off',
['require-yield']: 'off',
['@typescript-eslint/require-yield']: 'off',
['@typescript-eslint/no-explicit-any']: 'off',
['@typescript-eslint/no-non-null-assertion']: 'off',
['@typescript-eslint/no-empty-function']: 'off',
['@typescript-eslint/no-unused-expressions']: 'warn',
['@typescript-eslint/no-unused-vars']: [
'warn',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],
},
},
];