-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
58 lines (57 loc) · 1.67 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
56
57
58
import globals from 'globals'
import js from '@eslint/js'
import stylisticJs from '@stylistic/eslint-plugin-js'
export default [
js.configs.recommended,
stylisticJs.configs['all-flat'],
{
// files: ['**/*.js'],
plugins: {
'@stylistic/js': stylisticJs
},
languageOptions: {
globals: {
...globals.browser,
...globals.webextensions
}
},
rules: {
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_'
}
],
'@stylistic/js/indent': ['error', 'tab', { SwitchCase: 1 }],
'@stylistic/js/semi': ['error', 'never'],
'@stylistic/js/quotes': ['warn', 'single', { avoidEscape: true }],
'@stylistic/js/object-curly-spacing': ['warn', 'always'],
'@stylistic/js/arrow-parens': ['warn', 'as-needed'],
'@stylistic/js/padded-blocks': ['warn', 'never'],
'@stylistic/js/function-call-argument-newline': ['warn', 'consistent'],
'@stylistic/js/quote-props': ['warn', 'as-needed'],
'@stylistic/js/dot-location': ['warn', 'property'],
'@stylistic/js/spaced-comment': ['warn', 'always', { markers: ['//'] }],
'@stylistic/js/object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],
'@stylistic/js/multiline-comment-style': ['warn', 'separate-lines'],
'@stylistic/js/multiline-ternary': ['warn', 'never'],
'@stylistic/js/function-paren-newline': ['warn', 'multiline-arguments'],
'@stylistic/js/array-element-newline': ['warn', 'consistent'],
'@stylistic/js/space-before-function-paren': [
'error',
{ anonymous: 'always', named: 'never', asyncArrow: 'always' }
]
}
},
{
files: ['exe/*.js'],
languageOptions: {
globals: {
...globals.node
}
}
},
{
ignores: ['scripts/compiled/']
}
]