@eset-gdd/code-styleguide-eslint-vue3 1.0.5 → 1.1.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.
Files changed (2) hide show
  1. package/index.js +167 -140
  2. package/package.json +19 -18
package/index.js CHANGED
@@ -1,145 +1,172 @@
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),
1
+ import pluginVue from "eslint-plugin-vue";
2
+ import globals from "globals";
3
+
4
+ export default [
5
+ ...pluginVue.configs["flat/recommended"],
6
+ {
7
+ rules: {
8
+ // general
9
+ "vue/component-tags-order": [
10
+ "error",
11
+ {
12
+ order: ["template", "script", "style"],
13
+ },
14
+ ],
15
+ "vue/custom-event-name-casing": [
16
+ "warn",
17
+ "kebab-case",
18
+ {
19
+ ignores: [],
20
+ },
21
+ ],
22
+ "vue/component-definition-name-casing": ["error", "PascalCase"],
23
+ "vue/no-unused-properties": [
24
+ "warn",
25
+ {
26
+ groups: ["props", "data", "computed", "methods"],
27
+ },
8
28
  ],
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
29
 
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,
30
+ // template
31
+ "vue/no-multiple-template-root": "warn",
32
+ "vue/attributes-order": [
33
+ "error",
34
+ {
35
+ order: [
36
+ "DEFINITION",
37
+ "LIST_RENDERING",
38
+ "CONDITIONALS",
39
+ "RENDER_MODIFIERS",
40
+ "GLOBAL",
41
+ ["UNIQUE", "SLOT"],
42
+ "TWO_WAY_BINDING",
43
+ "OTHER_DIRECTIVES",
44
+ "OTHER_ATTR",
45
+ "EVENTS",
46
+ "CONTENT",
47
+ ],
48
+ alphabetical: false,
49
+ },
50
+ ],
51
+ "vue/html-self-closing": [
52
+ "error",
53
+ {
54
+ html: {
55
+ void: "always",
56
+ normal: "never",
57
+ component: "always",
140
58
  },
141
- ],
59
+ svg: "always",
60
+ math: "always",
61
+ },
62
+ ],
63
+ "vue/component-name-in-template-casing": [
64
+ "error",
65
+ "PascalCase",
66
+ {
67
+ registeredComponentsOnly: false,
68
+ },
69
+ ],
70
+ "vue/html-button-has-type": [
71
+ "warn",
72
+ {
73
+ button: true,
74
+ submit: true,
75
+ reset: true,
76
+ },
77
+ ],
78
+ "vue/no-multi-spaces": ["error"],
79
+ "vue/no-reserved-component-names": [
80
+ "error",
81
+ {
82
+ disallowVueBuiltInComponents: true,
83
+ disallowVue3BuiltInComponents: true,
84
+ },
85
+ ],
86
+ "vue/no-restricted-component-options": [
87
+ "error",
88
+ "init",
89
+ "beforeCompile",
90
+ "compiled",
91
+ "activate",
92
+ "ready",
93
+ "/^(?:at|de)tached$/",
94
+ ],
95
+ "vue/no-undef-components": [
96
+ "error",
97
+ {
98
+ ignorePatterns: [
99
+ "custom(\\-\\w+)+",
100
+ "app(\\-\\w+)+",
101
+ "b(\\-\\w+)+",
102
+ "font(\\-\\w+)+",
103
+ "nuxt",
104
+ "nuxt(\\-\\w+)+",
105
+ "router(\\-\\w+)+",
106
+ "VGuard",
107
+ ],
108
+ },
109
+ ],
110
+ "vue/no-useless-mustaches": [
111
+ "error",
112
+ {
113
+ ignoreIncludesComment: false,
114
+ ignoreStringEscape: false,
115
+ },
116
+ ],
117
+ "vue/no-useless-v-bind": [
118
+ "error",
119
+ {
120
+ ignoreIncludesComment: false,
121
+ ignoreStringEscape: false,
122
+ },
123
+ ],
124
+ "vue/padding-line-between-blocks": ["error", "always"],
125
+ "vue/v-on-event-hyphenation": [
126
+ "error",
127
+ "always",
128
+ {
129
+ autofix: false,
130
+ ignore: [],
131
+ },
132
+ ],
133
+ "vue/v-on-function-call": [
134
+ "error",
135
+ "never",
136
+ {
137
+ ignoreIncludesComment: false,
138
+ },
139
+ ],
140
+ "vue/define-macros-order": [
141
+ "error",
142
+ {
143
+ order: ["defineOptions", "defineProps", "defineEmits", "defineSlots"],
144
+ },
145
+ ],
146
+ "vue/prefer-separate-static-class": "error",
147
+ "vue/prefer-template": "error",
148
+ "vue/prop-name-casing": ["error", "camelCase"],
149
+ // "vue/custom-event-name-casing": ["error", "camelCase"],
150
+ },
151
+ languageOptions: {
152
+ sourceType: "module",
153
+ globals: {
154
+ ...globals.browser,
155
+ computed: "readonly",
156
+ defineEmits: "readonly",
157
+ defineExpose: "readonly",
158
+ defineProps: "readonly",
159
+ onMounted: "readonly",
160
+ onUnmounted: "readonly",
161
+ reactive: "readonly",
162
+ ref: "readonly",
163
+ shallowReactive: "readonly",
164
+ shallowRef: "readonly",
165
+ toRef: "readonly",
166
+ toRefs: "readonly",
167
+ watch: "readonly",
168
+ watchEffect: "readonly",
142
169
  },
143
170
  },
144
- ],
145
- };
171
+ },
172
+ ];
package/package.json CHANGED
@@ -1,37 +1,38 @@
1
1
  {
2
2
  "name": "@eset-gdd/code-styleguide-eslint-vue3",
3
- "version": "1.0.5",
4
- "main": "index.js",
3
+ "type": "module",
4
+ "version": "1.1.0",
5
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
- ],
6
+ "author": "ESET GWD Team",
7
+ "license": "ISC",
8
+ "homepage": "https://github.com/esetweb/code-styleguide#readme",
13
9
  "repository": {
14
10
  "type": "git",
15
11
  "url": "git+https://github.com/esetweb/code-styleguide.git",
16
12
  "directory": "packages/eslint-vue3"
17
13
  },
18
- "author": "ESET GWD Team",
19
- "license": "ISC",
20
14
  "bugs": {
21
15
  "url": "https://github.com/esetweb/code-styleguide/issues"
22
16
  },
23
- "homepage": "https://github.com/esetweb/code-styleguide#readme",
17
+ "keywords": [
18
+ "eslint",
19
+ "eslint-config",
20
+ "vue",
21
+ "vue3",
22
+ "code-style"
23
+ ],
24
+ "exports": "./index.js",
25
+ "main": "index.js",
24
26
  "files": [
25
- "index.js",
26
- "README.md"
27
+ "README.md",
28
+ "index.js"
27
29
  ],
28
30
  "peerDependencies": {
29
- "eslint": "^8.22.0",
31
+ "eslint": "^9.37.0",
30
32
  "vue": ">=3.0.0"
31
33
  },
32
34
  "dependencies": {
33
- "@eset-gdd/code-styleguide-eslint-base": "^1.0.5",
34
- "@vue/eslint-config-prettier": "^9.0.0",
35
- "eslint-plugin-vue": "^9.3.0"
35
+ "eslint-plugin-vue": "^9.31.0",
36
+ "globals": "^16.4.0"
36
37
  }
37
38
  }