forked from binbat/woom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
55 lines (53 loc) · 1.72 KB
/
eslint.config.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
import js from '@eslint/js'
import ts from 'typescript-eslint'
import stylisticJs from '@stylistic/eslint-plugin-js'
export default ts.config(
{
ignores: [
'static/'
]
},
js.configs.recommended,
{
// js options
plugins: {
'@stylistic/js': stylisticJs
},
rules: {
'@stylistic/js/comma-spacing': ['warn', {'before': false, 'after': true}],
'@stylistic/js/semi': ['warn', 'never'],
'@stylistic/js/space-in-parens': ['warn', 'never'],
'@stylistic/js/space-before-blocks': ['warn', { 'functions': 'always', 'keywords': 'always', 'classes': 'always' }],
'@stylistic/js/space-infix-ops': ['warn', { 'int32Hint': false }],
'@stylistic/js/space-unary-ops': ['warn'],
'@stylistic/js/switch-colon-spacing': ['warn'],
'@stylistic/js/no-multi-spaces': ['warn'],
'@stylistic/js/no-multiple-empty-lines': ['warn'],
'@stylistic/js/no-trailing-spaces': ['warn'],
'@stylistic/js/no-whitespace-before-property': ['warn'],
'@stylistic/js/new-parens': ['warn', 'always'],
'comma-dangle': ['warn', 'only-multiline'],
'@stylistic/js/quotes': ['warn', 'single', { 'avoidEscape': true }],
'@stylistic/js/indent': ['warn', 2, { 'SwitchCase': 1 }],
'@stylistic/js/jsx-quotes': ['warn', 'prefer-double']
}
},
...ts.configs.recommended,
{
// ts options
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
'args': 'all',
'argsIgnorePattern': '^_',
'caughtErrors': 'all',
'caughtErrorsIgnorePattern': '^_',
'destructuredArrayIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'ignoreRestSiblings': true
}
]
}
}
)