-
Notifications
You must be signed in to change notification settings - Fork 589
/
.eslintrc.js
104 lines (103 loc) · 2.98 KB
/
.eslintrc.js
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
env: {
'browser': true,
'es2021': true
},
extends: [],
parser: '@typescript-eslint/parser',
parserOptions: {
'ecmaVersion': 'latest',
'sourceType': 'module',
'project': ['./tsconfig.json']
},
plugins: [
'@typescript-eslint'
],
ignorePatterns: [
'src/vendor/**',
'src/solid/**',
'src/opus-recorder/**',
'public/**'
],
overrides: [{
files: ['*.ts'],
parserOptions: {
project: ['./tsconfig.json'],
},
}],
rules: {
'max-len': 'off',
'keyword-spacing': ['error', {
after: true,
overrides: {
if: {before: true, after: false},
else: {before: true},
catch: {before: true, after: false},
for: {after: false},
while: {after: false},
switch: {after: false}
}
}],
'linebreak-style': ['error', 'unix'],
'eol-last': 'error',
'indent': [
'error', 2, {
'CallExpression': {
'arguments': 1
},
'FunctionDeclaration': {
'body': 1,
'parameters': 1
},
'FunctionExpression': {
'body': 1,
'parameters': 1
},
'MemberExpression': 0,
'ObjectExpression': 1,
'SwitchCase': 1,
'ignoredNodes': [
'ConditionalExpression'
]
}
],
// 'valid-jsdoc': 'off',
// 'require-jsdoc': 'off',
// 'camelcase': 'off',
'space-before-function-paren': ['error', 'never'],
// 'guard-for-in': 'off',
// 'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}],
'prefer-promise-reject-errors': 'off',
'curly': 'off',
'comma-dangle': ['error', 'never'],
'comma-spacing': 'error',
'comma-style': 'error',
'quote-props': ['error', 'consistent'],
'quotes': ['error', 'single', {allowTemplateLiterals: true}],
'space-before-blocks': ['error', 'always'],
'spaced-comment': ['error', 'always'],
'prefer-spread': 'off',
'prefer-const': ['error', {destructuring: 'all'}],
'object-curly-spacing': ['error', 'never'],
'array-bracket-spacing': ['error', 'never'],
'switch-colon-spacing': 'error',
'operator-linebreak': ['error', 'after'],
'padded-blocks': ['error', 'never'],
// 'new-cap': 'error',
// 'no-unused-vars': 'off',
'no-useless-call': 'error',
'no-trailing-spaces': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': ['error', {max: 2}],
'no-tabs': 'error',
// 'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-new-wrappers': 'error',
'no-irregular-whitespace': ['error', {skipStrings: true, skipComments: true, skipRegExps: true, skipTemplates: true}],
'no-unexpected-multiline': 'error',
'no-return-await': 'error',
'@typescript-eslint/await-thenable': 'error',
// '@typescript-eslint/no-misused-promises': 'error'
// '@typescript-eslint/no-misused-promises': ['error', {checksConditionals: true, checksVoidReturn: true, checksSpreads: true}]
}
};