-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
69 lines (65 loc) · 2.41 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
59
60
61
62
63
64
65
66
67
68
69
import globals from 'globals';
import js from '@eslint/js';
import stylisticJs from '@stylistic/eslint-plugin-js';
export default [
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.nodeBuiltin,
},
},
},
{
plugins: {
'@stylistic/js': stylisticJs,
},
rules: {
'camelcase': ['error', { 'properties': 'never' }],
'eqeqeq': 'error',
'no-array-constructor': 'error',
'no-empty': ['error', { 'allowEmptyCatch': true }],
'no-const-assign': 'error',
'no-duplicate-imports': 'error',
'no-debugger': 'error',
'no-invalid-regexp': 'error',
'no-redeclare': ['error', { 'builtinGlobals': false }],
'no-unneeded-ternary': 'error',
'@stylistic/js/arrow-spacing': 'error',
'@stylistic/js/block-spacing': ['error', 'always'],
'@stylistic/js/brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
'@stylistic/js/comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'never',
'exports': 'never',
'functions': 'never',
}],
'@stylistic/js/comma-spacing': ['error', { 'before': false, 'after': true }],
'@stylistic/js/comma-style': ['error', 'last'],
'@stylistic/js/dot-location': ['error', 'property'],
'@stylistic/js/eol-last': 'error',
'@stylistic/js/function-call-spacing': ['error', 'never'],
'@stylistic/js/indent': ['error', 'tab', {
'SwitchCase': 1,
'ignoredNodes': ['TemplateLiteral *'],
}],
'@stylistic/js/keyword-spacing': 'error',
'@stylistic/js/key-spacing': ['error', { 'beforeColon': false, 'afterColon': true }],
'@stylistic/js/linebreak-style': ['error', 'unix'],
'@stylistic/js/no-multi-spaces': 'error',
'@stylistic/js/no-whitespace-before-property': 'error',
'@stylistic/js/padded-blocks': ['error', 'never'],
'@stylistic/js/quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
'@stylistic/js/rest-spread-spacing': ['error', 'never'],
'@stylistic/js/semi': ['error', 'always'],
'@stylistic/js/semi-spacing': ['error', { 'before': false, 'after': true }],
'@stylistic/js/space-infix-ops': ['error', { 'int32Hint': false }],
'@stylistic/js/space-before-function-paren': ['error', 'never'],
'@stylistic/js/space-before-blocks': ['error', 'always'],
'@stylistic/js/space-in-parens': ['error', 'never'],
'@stylistic/js/spaced-comment': 'error',
'@stylistic/js/template-curly-spacing': ['error', 'never'],
},
},
];