forked from gptscript-ai/tools-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
130 lines (120 loc) · 4.04 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import antfu from '@antfu/eslint-config'
export default antfu({
stylistic: {
indent: 2,
quotes: 'single',
semi: false,
},
typescript: true,
vue: true,
rules: {
'array-bracket-spacing': 'error',
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', { before: true, after: true }],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
'comma-dangle': ['error', 'only-multiline'],
'comma-spacing': 'error',
'curly': ['error', 'all'],
'func-call-spacing': ['error', 'never'],
'implicit-arrow-linebreak': 'error',
'keyword-spacing': 'error',
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'multiline-ternary': ['error', 'never'],
'n/prefer-global/process': 'off',
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }],
'no-caller': 'error',
'no-cond-assign': ['error', 'except-parens'],
'no-console': ['error', { allow: ['debug', 'info', 'error'] }],
'no-debugger': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-trailing-spaces': 'error',
'no-unused-vars': 'error',
'no-whitespace-before-property': 'error',
'object-curly-spacing': ['error', 'always'],
'object-property-newline': 'off',
'object-shorthand': 'error',
'padded-blocks': ['error', 'never'],
'prefer-arrow-callback': 'error',
'prefer-template': 'error',
'quote-props': ['error', 'consistent-as-needed'],
'react/display-name': 'off',
'react/no-unknown-property': 'off',
'rest-spread-spacing': 'error',
'space-before-function-paren': 'off',
'space-in-parens': 'off',
'space-infix-ops': 'error',
'spaced-comment': 'error',
'switch-colon-spacing': 'error',
'template-curly-spacing': ['error', 'always'],
'yield-star-spacing': ['error', 'both'],
'style/arrow-parens': ['error', 'always'],
'style/brace-style': ['error', '1tbs', { allowSingleLine: false }],
'style/type-annotation-spacing': 'off',
'style/template-curly-spacing': ['error', 'always'],
'style/no-multi-spaces': 'off',
'style/key-spacing': ['error', {
multiLine: {
beforeColon: false,
afterColon: true,
},
align: {
beforeColon: false,
afterColon: true,
mode: 'minimum',
on: 'value',
},
}],
'style/object-curly-newline': ['error', {
ObjectExpression: {
multiline: true,
minProperties: 4,
},
ObjectPattern: {
multiline: true,
minProperties: 4,
},
ImportDeclaration: {
multiline: true,
minProperties: 5,
},
ExportDeclaration: {
multiline: true,
minProperties: 3,
},
}],
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: '*',
next: 'return',
},
{
blankLine: 'always',
prev: 'function',
next: 'function',
},
{
blankLine: 'always',
prev: ['const', 'let', 'var'],
next: '*',
},
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var'],
},
],
'quotes': [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'vue/component-options-name-casing': ['error', 'kebab-case'],
},
})