forked from Nuklon/Steam-Economy-Enhancer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
54 lines (53 loc) · 1.5 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
import globals from 'globals';
import pluginJs from '@eslint/js';
import userscripts from 'eslint-plugin-userscripts';
import stylistic from '@stylistic/eslint-plugin';
export default [
{
languageOptions: {
globals: globals.browser
},
plugins: {
'@stylistic': stylistic,
},
...pluginJs.configs.recommended,
...stylistic.configs['all-flat'],
rules: {
'@stylistic/brace-style': ['error', '1tbs'],
'@stylistic/function-call-argument-newline': 'off',
'@stylistic/keyword-spacing': ['error', { before: true }],
'@stylistic/multiline-comment-style': 'off',
'@stylistic/multiline-ternary': 'off',
'@stylistic/newline-per-chained-call': 'off',
'@stylistic/padded-blocks': 'off',
'@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/space-before-function-paren': ['error', 'never'],
'@stylistic/spaced-comment': 'off',
'@stylistic/template-curly-spacing': ['error', 'never'],
curly: ['error', 'all'],
'no-var': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-template': 'error',
}
},
{
files: ['*.user.js'],
plugins: {
userscripts: {
rules: userscripts.rules
}
},
rules: {
...userscripts.configs.recommended.rules,
},
settings: {
userscriptVersions: {
greasemonkey: '*',
tampermonkey: '*',
violentmonkey: '*'
}
}
}
];