-
Notifications
You must be signed in to change notification settings - Fork 30
/
eslint.config.mjs
56 lines (50 loc) · 1.37 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
import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
stylistic.configs.customize({
indent: 2,
semi: true,
arrowParens: false,
commaDangle: 'never',
quotes: 'single',
quoteProps: 'consistent',
blockSpacing: true,
braceStyle: '1tbs'
}),
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
ReadableStream: false,
WritableStream: false,
TransformStream: false,
ByteLengthQueuingStrategy: false,
CountQueuingStrategy: false,
AbortSignal: false,
DEBUG: false,
GCController: false,
gc: false,
globalThis: false
},
ecmaVersion: 2018,
sourceType: 'module'
},
rules: {
'no-self-compare': 'error',
'prefer-const': ['error', {
ignoreReadBeforeAssign: true
}],
'@stylistic/function-paren-newline': ['error', 'multiline'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-useless-constructor': 'error'
}
}
);