forked from syuilo/ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
62 lines (61 loc) · 1.51 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
import pluginJs from '@eslint/js';
import tsEslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
export default [
{
files: ['**/*.{js,mjs,ts}']
},
stylistic.configs['recommended-flat'],
pluginJs.configs.recommended,
...tsEslint.configs.recommended,
{
rules: {
'no-console': 'error',
'@stylistic/semi': ['error', 'always'],
'@stylistic/comma-dangle': ['error', 'never'],
'@stylistic/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
},
multilineDetection: 'brackets'
}],
'@typescript-eslint/no-unused-vars': ['error', {
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true
}],
'@stylistic/indent': ['error', 'tab'],
'@stylistic/indent-binary-ops': 'warn',
'@stylistic/no-tabs': ['error', {
allowIndentationTabs: true
}],
'@stylistic/brace-style': ['error', '1tbs'],
'@stylistic/operator-linebreak': ['error', 'before', {
overrides: {
'||': 'after',
'&&': 'after'
}
}],
'@stylistic/arrow-parens': ['error', 'as-needed'],
'@stylistic/spaced-comment': ['error', 'always', {
markers: ['#region', '#endregion']
}],
'no-irregular-whitespace': ['error', {
skipStrings: true,
skipTemplates: true
}]
}
},
{
ignores: ['built/*']
}
];