-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
eslint.config.mjs
82 lines (68 loc) · 1.77 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
'node_modules/*',
'build/*',
'webpack.main.config.js',
'webpack.preload.config.js',
'webpack.renderer.config.js',
],
rules: {
quotes: ['error', 'single', {
avoidEscape: true,
}],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
argsIgnorePattern: '^_',
}],
'max-len': ['error', {
code: 160,
tabWidth: 2,
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'function-paren-newline': ['error', 'multiline-arguments'],
'comma-dangle': ['error', {
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'ignore',
}],
'comma-spacing': ['error', {
before: false,
after: true,
}],
'consistent-return': 'error',
'no-use-before-define': ['error', {
functions: true,
classes: true,
variables: true,
}],
'no-multi-spaces': 'error',
'new-cap': ['error', {
newIsCap: true,
newIsCapExceptions: [],
capIsNew: false,
capIsNewExceptions: [],
}],
'arrow-body-style': ['error', 'as-needed', {
requireReturnForObjectLiteral: false,
}],
curly: 'error',
'no-var': 'error',
eqeqeq: 'error',
},
}
);