-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy patheslint.config.js
41 lines (40 loc) · 914 Bytes
/
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
import antfu from '@antfu/eslint-config';
export default antfu(
{ },
{
// setting
languageOptions: {
globals: {
UniApp: 'readonly',
uni: 'readonly',
plus: 'readonly',
process: 'readonly',
browser: 'readonly',
},
},
// style
rules: {
'style/quote-props': ['error', 'as-needed'],
'style/semi': ['error', 'always'],
'style/max-statements-per-line': ['error', { max: 1 }],
curly: ['warn', 'all'],
'style/member-delimiter-style': ['warn', {
multiline: { delimiter: 'semi', requireLast: true },
singleline: { delimiter: 'semi', requireLast: false },
multilineDetection: 'brackets',
}],
},
},
{
rules: {
'no-console': 'off',
},
},
{
files: ['**/manifest.json'],
rules: {
indent: ['error', 4],
'jsonc/indent': ['error', 4],
},
},
);