@eset-gdd/code-styleguide-eslint-vue3 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +145 -0
- package/package.json +37 -0
package/index.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
overrides: [
|
|
3
|
+
{
|
|
4
|
+
files: ["*.js", "*.jsx", "*.ts", "*.tsx", "*.vue"],
|
|
5
|
+
extends: [
|
|
6
|
+
...["plugin:vue/vue3-recommended", "@vue/prettier"],
|
|
7
|
+
...["@eset-gdd/code-styleguide-eslint-base"].map(require.resolve),
|
|
8
|
+
],
|
|
9
|
+
rules: {
|
|
10
|
+
// general
|
|
11
|
+
"vue/component-tags-order": [
|
|
12
|
+
"error",
|
|
13
|
+
{
|
|
14
|
+
order: ["template", "script", "style"],
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
"vue/custom-event-name-casing": [
|
|
18
|
+
"warn",
|
|
19
|
+
"kebab-case",
|
|
20
|
+
{
|
|
21
|
+
ignores: [],
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
"vue/component-definition-name-casing": ["error", "PascalCase"],
|
|
25
|
+
"vue/no-unused-properties": [
|
|
26
|
+
"warn",
|
|
27
|
+
{
|
|
28
|
+
groups: ["props", "data", "computed", "methods"],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
|
|
32
|
+
// template
|
|
33
|
+
"vue/no-multiple-template-root": "warn",
|
|
34
|
+
"vue/attributes-order": [
|
|
35
|
+
"error",
|
|
36
|
+
{
|
|
37
|
+
order: [
|
|
38
|
+
"DEFINITION",
|
|
39
|
+
"LIST_RENDERING",
|
|
40
|
+
"CONDITIONALS",
|
|
41
|
+
"RENDER_MODIFIERS",
|
|
42
|
+
"GLOBAL",
|
|
43
|
+
["UNIQUE", "SLOT"],
|
|
44
|
+
"TWO_WAY_BINDING",
|
|
45
|
+
"OTHER_DIRECTIVES",
|
|
46
|
+
"OTHER_ATTR",
|
|
47
|
+
"EVENTS",
|
|
48
|
+
"CONTENT",
|
|
49
|
+
],
|
|
50
|
+
alphabetical: false,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
"vue/html-self-closing": [
|
|
54
|
+
"error",
|
|
55
|
+
{
|
|
56
|
+
html: {
|
|
57
|
+
void: "always",
|
|
58
|
+
normal: "never",
|
|
59
|
+
component: "always",
|
|
60
|
+
},
|
|
61
|
+
svg: "always",
|
|
62
|
+
math: "always",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
"vue/component-name-in-template-casing": [
|
|
66
|
+
"error",
|
|
67
|
+
"PascalCase",
|
|
68
|
+
{
|
|
69
|
+
registeredComponentsOnly: false,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
"vue/html-button-has-type": [
|
|
73
|
+
"warn",
|
|
74
|
+
{
|
|
75
|
+
button: true,
|
|
76
|
+
submit: true,
|
|
77
|
+
reset: true,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
"vue/no-multi-spaces": ["error"],
|
|
81
|
+
"vue/no-reserved-component-names": [
|
|
82
|
+
"error",
|
|
83
|
+
{
|
|
84
|
+
disallowVueBuiltInComponents: true,
|
|
85
|
+
disallowVue3BuiltInComponents: true,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
"vue/no-restricted-component-options": [
|
|
89
|
+
"error",
|
|
90
|
+
"init",
|
|
91
|
+
"beforeCompile",
|
|
92
|
+
"compiled",
|
|
93
|
+
"activate",
|
|
94
|
+
"ready",
|
|
95
|
+
"/^(?:at|de)tached$/",
|
|
96
|
+
],
|
|
97
|
+
"vue/no-undef-components": [
|
|
98
|
+
"error",
|
|
99
|
+
{
|
|
100
|
+
ignorePatterns: [
|
|
101
|
+
"custom(\\-\\w+)+",
|
|
102
|
+
"app(\\-\\w+)+",
|
|
103
|
+
"b(\\-\\w+)+",
|
|
104
|
+
"font(\\-\\w+)+",
|
|
105
|
+
"nuxt",
|
|
106
|
+
"nuxt(\\-\\w+)+",
|
|
107
|
+
"router(\\-\\w+)+",
|
|
108
|
+
"VGuard",
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
"vue/no-useless-mustaches": [
|
|
113
|
+
"error",
|
|
114
|
+
{
|
|
115
|
+
ignoreIncludesComment: false,
|
|
116
|
+
ignoreStringEscape: false,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
"vue/no-useless-v-bind": [
|
|
120
|
+
"error",
|
|
121
|
+
{
|
|
122
|
+
ignoreIncludesComment: false,
|
|
123
|
+
ignoreStringEscape: false,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
"vue/padding-line-between-blocks": ["error", "always"],
|
|
127
|
+
"vue/v-on-event-hyphenation": [
|
|
128
|
+
"error",
|
|
129
|
+
"always",
|
|
130
|
+
{
|
|
131
|
+
autofix: false,
|
|
132
|
+
ignore: [],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
"vue/v-on-function-call": [
|
|
136
|
+
"error",
|
|
137
|
+
"never",
|
|
138
|
+
{
|
|
139
|
+
ignoreIncludesComment: false,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eset-gdd/code-styleguide-eslint-vue3",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"description": "Vue 3 ESLint configuration for ESET's Frontend Coding Styleguide",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"eslint",
|
|
8
|
+
"eslint-config",
|
|
9
|
+
"vue",
|
|
10
|
+
"vue3",
|
|
11
|
+
"code-style"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/esetweb/code-styleguide.git",
|
|
16
|
+
"directory": "packages/eslint-vue3"
|
|
17
|
+
},
|
|
18
|
+
"author": "ESET GWD Team",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/esetweb/code-styleguide/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/esetweb/code-styleguide#readme",
|
|
24
|
+
"files": [
|
|
25
|
+
"index.js",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"eslint": "^8.22.0",
|
|
30
|
+
"vue": ">=3.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@eset-gdd/code-styleguide-eslint-base": "^1.0.0",
|
|
34
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
35
|
+
"eslint-plugin-vue": "^9.3.0"
|
|
36
|
+
}
|
|
37
|
+
}
|