-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
96 lines (95 loc) · 2.48 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
},
plugins: ["simple-import-sort"],
rules: {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"no-console": "warn",
"no-debugger": "warn",
indent: ["warn", 2],
// need add *.page.vue to ignore
// but it's does not work with regexp -> off
"vue/multi-word-component-names": "off",
"vue/order-in-components": [
"error",
{
order: [
"directives",
"components",
"mixins",
["provide", "inject"],
"props",
"data",
"methods",
"computed",
"watch",
"LIFECYCLE_HOOKS",
"ROUTER_GUARDS",
],
},
],
"vue/v-for-delimiter-style": ["error", "of"],
"vue/next-tick-style": ["error", "promise"],
"vue/require-prop-types": "error",
"vue/prop-name-casing": ["error", "camelCase"],
"vue/component-name-in-template-casing": ["error", "PascalCase"],
"vue/component-definition-name-casing": ["error", "PascalCase"],
"vue/custom-event-name-casing": ["error", "camelCase"],
"vue/no-duplicate-attr-inheritance": "error",
"vue/this-in-template": ["error", "never"],
"vue/v-on-style": ["error", "shorthand"],
"vue/no-multi-spaces": "error",
"vue/padding-line-between-blocks": "error",
"vue/component-tags-order": [
"error",
{
order: ["template", "script", "style"],
},
],
"vue/v-on-event-hyphenation": ["error", "never"],
"vue/attribute-hyphenation": ["error", "never"],
"vue/attributes-order": [
"error",
{
order: [
"DEFINITION",
"LIST_RENDERING",
"CONDITIONALS",
"RENDER_MODIFIERS",
"GLOBAL",
["UNIQUE", "SLOT"],
"TWO_WAY_BINDING",
"OTHER_DIRECTIVES",
"OTHER_ATTR",
"EVENTS",
"CONTENT",
],
alphabetical: false,
},
],
"vue/v-bind-style": "error",
"vue/v-slot-style": ["error", "shorthand"],
"vue/no-unused-properties": [
"error",
{
groups: ["props", "data", "computed", "methods", "setup"],
ignorePublicMembers: true,
},
],
},
};