forked from pipipi-pikachu/PPTist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
77 lines (76 loc) · 2.09 KB
/
.eslintrc.cjs
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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript'
],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
'curly': ['error', 'multi-line'],
'eqeqeq': ['error', 'always'],
'semi': ['error', 'never'],
'indent': ['error', 2, {
'SwitchCase': 1,
}],
'quotes': ['error', 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true,
}],
'key-spacing': ['error', {
'beforeColon': false,
'afterColon': true,
'mode': 'strict',
}],
'no-empty': 'error',
'no-else-return': 'error',
'no-multi-spaces': 'error',
'require-await': 'error',
'brace-style': ['error', 'stroustrup'],
'spaced-comment': ['error', 'always'],
'arrow-spacing': 'error',
'no-duplicate-imports': 'error',
'comma-spacing': ['error', {
'before': false,
'after': true,
}],
'default-case': 'error',
'consistent-this': ['error', '_this'],
'max-depth': ['error', 8],
'max-lines': ['error', 800],
'no-multi-str': 'error',
'space-infix-ops': 'error',
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', {
'named': 'never',
'anonymous': 'never',
'asyncArrow': 'always',
}],
'keyword-spacing': ['error'],
'prefer-const': 'error',
'no-useless-return': 'error',
'array-bracket-spacing': 'error',
'no-useless-escape': 'off',
'no-eval': 'error',
'no-var': 'error',
'no-with': 'error',
'no-alert': 'warn',
'no-console': 'warn',
'no-debugger': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': ['error', {
'extendDefaults': true,
'types': {
'{}': false,
},
}],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
}
}