@blueking/eslint-config-bk 2.0.0 → 2.1.0-beta.10
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 +26 -1
- package/package.json +14 -10
- package/ts.js +27 -336
- package/tsvue.js +26 -1
- package/tsvue3.js +56 -0
- package/vue.js +25 -0
- package/vue.rule.js +25 -0
- package/vue3.js +48 -0
- package/vue3.rule.js +376 -0
- package/base.js +0 -686
- package/import.js +0 -26
package/index.js
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
1
26
|
module.exports = {
|
|
2
|
-
extends: ['
|
|
27
|
+
extends: ['eslint-config-tencent'],
|
|
3
28
|
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/eslint-config-bk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-beta.10",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
+
"eslint-config-prettier": "^8.5.0",
|
|
7
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
8
|
+
"prettier": "^2.7.1",
|
|
6
9
|
"@babel/eslint-parser": "^7.14.3",
|
|
7
|
-
"@typescript-eslint/eslint-plugin": "~
|
|
8
|
-
"@typescript-eslint/parser": "~
|
|
9
|
-
"@vue/eslint-config-standard": "~
|
|
10
|
-
"@vue/eslint-config-typescript": "~
|
|
11
|
-
"eslint": "^
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "~5.20.0",
|
|
11
|
+
"@typescript-eslint/parser": "~5.20.0",
|
|
12
|
+
"@vue/eslint-config-standard": "~6.1.0",
|
|
13
|
+
"@vue/eslint-config-typescript": "~10.0.0",
|
|
14
|
+
"eslint": "^8.14.0",
|
|
15
|
+
"eslint-config-tencent": "^1.0.4",
|
|
12
16
|
"eslint-plugin-import": "^2.23.3",
|
|
13
17
|
"eslint-plugin-node": "~11.1.0",
|
|
14
|
-
"eslint-plugin-promise": "~
|
|
15
|
-
"eslint-plugin-standard": "~
|
|
16
|
-
"eslint-plugin-vue": "^7.
|
|
17
|
-
"typescript": "~
|
|
18
|
+
"eslint-plugin-promise": "~6.0.0",
|
|
19
|
+
"eslint-plugin-standard": "~5.0.0",
|
|
20
|
+
"eslint-plugin-vue": "^8.7.1",
|
|
21
|
+
"typescript": "~4.6.3"
|
|
18
22
|
},
|
|
19
23
|
"keywords": [
|
|
20
24
|
"eslint-config-bk",
|
package/ts.js
CHANGED
|
@@ -1,337 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
1
26
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
project: [
|
|
5
|
-
'./tsconfig.json',
|
|
6
|
-
],
|
|
7
|
-
},
|
|
8
|
-
plugins: ['@typescript-eslint'],
|
|
9
|
-
rules: {
|
|
10
|
-
'brace-style': 'off',
|
|
11
|
-
'no-empty-function': 'off',
|
|
12
|
-
// https://github.com/typescript-eslint/typescript-eslint/issues/491
|
|
13
|
-
'no-invalid-this': 'off',
|
|
14
|
-
'no-magic-numbers': 'off',
|
|
15
|
-
'react/sort-comp': 'off',
|
|
16
|
-
'func-call-spacing': 'off',
|
|
17
|
-
'comma-spacing': 'off',
|
|
18
|
-
'dot-notation': 'off',
|
|
19
|
-
indent: 'off',
|
|
20
|
-
'keyword-spacing': 'off',
|
|
21
|
-
camelcase: 'off',
|
|
22
|
-
'no-underscore-dangle': 'off',
|
|
23
|
-
'no-array-constructor': 'off',
|
|
24
|
-
'no-dupe-class-members': 'off',
|
|
25
|
-
'no-undef': 'off',
|
|
26
|
-
'no-unused-vars': 'off',
|
|
27
|
-
'no-useless-constructor': 'off',
|
|
28
|
-
quotes: 'off',
|
|
29
|
-
semi: 'off',
|
|
30
|
-
'space-before-function-paren': 'off',
|
|
31
|
-
/**
|
|
32
|
-
* 重载的函数必须写在一起
|
|
33
|
-
* @reason 增加可读性
|
|
34
|
-
*/
|
|
35
|
-
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
36
|
-
/** 同 JS 规则的 TS 版本 */
|
|
37
|
-
'@typescript-eslint/brace-style': 'error',
|
|
38
|
-
/**
|
|
39
|
-
* 类的只读属性若是一个字面量,则必须使用只读属性而不是 getter
|
|
40
|
-
*/
|
|
41
|
-
'@typescript-eslint/class-literal-property-style': [
|
|
42
|
-
'error',
|
|
43
|
-
'fields',
|
|
44
|
-
],
|
|
45
|
-
/** 同 JS 规则的 TS 版本 */
|
|
46
|
-
'@typescript-eslint/comma-spacing': [
|
|
47
|
-
'error',
|
|
48
|
-
{
|
|
49
|
-
before: false,
|
|
50
|
-
after: true,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
/**
|
|
54
|
-
* 类型断言必须使用 as Type,禁止使用 <Type>,禁止对对象字面量进行类型断言(断言成 any 是允许的)
|
|
55
|
-
* @reason <Type> 容易被理解为 jsx
|
|
56
|
-
*/
|
|
57
|
-
'@typescript-eslint/consistent-type-assertions': [
|
|
58
|
-
'error',
|
|
59
|
-
{
|
|
60
|
-
assertionStyle: 'as',
|
|
61
|
-
objectLiteralTypeAssertions: 'never',
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
/**
|
|
65
|
-
* 优先使用 interface 而不是 type
|
|
66
|
-
*/
|
|
67
|
-
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
68
|
-
/** 同 JS 规则的 TS 版本 */
|
|
69
|
-
'@typescript-eslint/dot-notation': 'warn',
|
|
70
|
-
/**
|
|
71
|
-
* 必须设置类的成员的可访问性
|
|
72
|
-
* @reason 将不需要公开的成员设为私有的,可以增强代码的可理解性,对文档输出也很友好
|
|
73
|
-
*/
|
|
74
|
-
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
75
|
-
/**
|
|
76
|
-
* 要求或禁止在函数标识符和其调用之间有空格
|
|
77
|
-
*/
|
|
78
|
-
'@typescript-eslint/func-call-spacing': [
|
|
79
|
-
'error',
|
|
80
|
-
'never',
|
|
81
|
-
],
|
|
82
|
-
/** 同 JS 规则的 TS 版本 */
|
|
83
|
-
'@typescript-eslint/indent': [
|
|
84
|
-
'warn',
|
|
85
|
-
2,
|
|
86
|
-
{
|
|
87
|
-
SwitchCase: 1,
|
|
88
|
-
VariableDeclarator: 1,
|
|
89
|
-
outerIIFEBody: 1,
|
|
90
|
-
FunctionDeclaration: {
|
|
91
|
-
parameters: 1,
|
|
92
|
-
body: 1,
|
|
93
|
-
},
|
|
94
|
-
FunctionExpression: {
|
|
95
|
-
parameters: 1,
|
|
96
|
-
body: 1,
|
|
97
|
-
},
|
|
98
|
-
CallExpression: {
|
|
99
|
-
arguments: 1,
|
|
100
|
-
},
|
|
101
|
-
ArrayExpression: 1,
|
|
102
|
-
ObjectExpression: 1,
|
|
103
|
-
ImportDeclaration: 1,
|
|
104
|
-
flatTernaryExpressions: false,
|
|
105
|
-
ignoredNodes: [
|
|
106
|
-
'JSXElement',
|
|
107
|
-
'JSXElement > *',
|
|
108
|
-
'JSXAttribute',
|
|
109
|
-
'JSXIdentifier',
|
|
110
|
-
'JSXNamespacedName',
|
|
111
|
-
'JSXMemberExpression',
|
|
112
|
-
'JSXSpreadAttribute',
|
|
113
|
-
'JSXExpressionContainer',
|
|
114
|
-
'JSXOpeningElement',
|
|
115
|
-
'JSXClosingElement',
|
|
116
|
-
'JSXFragment',
|
|
117
|
-
'JSXOpeningFragment',
|
|
118
|
-
'JSXClosingFragment',
|
|
119
|
-
'JSXText',
|
|
120
|
-
'JSXEmptyExpression',
|
|
121
|
-
'JSXSpreadChild',
|
|
122
|
-
],
|
|
123
|
-
ignoreComments: false,
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
/** 同 JS 规则的 TS 版本 */
|
|
127
|
-
'@typescript-eslint/keyword-spacing': [
|
|
128
|
-
'error',
|
|
129
|
-
{
|
|
130
|
-
overrides: {
|
|
131
|
-
if: {
|
|
132
|
-
after: true,
|
|
133
|
-
},
|
|
134
|
-
for: {
|
|
135
|
-
after: true,
|
|
136
|
-
},
|
|
137
|
-
while: {
|
|
138
|
-
after: true,
|
|
139
|
-
},
|
|
140
|
-
else: {
|
|
141
|
-
after: true,
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
before: true,
|
|
145
|
-
after: true,
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
/**
|
|
149
|
-
* 指定类成员的排序规则
|
|
150
|
-
* @reason 优先级:
|
|
151
|
-
* 1. static > instance
|
|
152
|
-
* 2. field > constructor > method
|
|
153
|
-
* 3. public > protected > private
|
|
154
|
-
*/
|
|
155
|
-
'@typescript-eslint/member-ordering': [
|
|
156
|
-
'error',
|
|
157
|
-
{
|
|
158
|
-
default: [
|
|
159
|
-
'public-static-field',
|
|
160
|
-
'protected-static-field',
|
|
161
|
-
'private-static-field',
|
|
162
|
-
'static-field',
|
|
163
|
-
'public-static-method',
|
|
164
|
-
'protected-static-method',
|
|
165
|
-
'private-static-method',
|
|
166
|
-
'static-method',
|
|
167
|
-
'public-instance-field',
|
|
168
|
-
'protected-instance-field',
|
|
169
|
-
'private-instance-field',
|
|
170
|
-
'public-field',
|
|
171
|
-
'protected-field',
|
|
172
|
-
'private-field',
|
|
173
|
-
'instance-field',
|
|
174
|
-
'field',
|
|
175
|
-
'constructor',
|
|
176
|
-
'public-instance-method',
|
|
177
|
-
'protected-instance-method',
|
|
178
|
-
'private-instance-method',
|
|
179
|
-
'public-method',
|
|
180
|
-
'protected-method',
|
|
181
|
-
'private-method',
|
|
182
|
-
'instance-method',
|
|
183
|
-
'method',
|
|
184
|
-
],
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
/**
|
|
188
|
-
* 接口中的方法必须用属性的方式定义
|
|
189
|
-
*/
|
|
190
|
-
'@typescript-eslint/method-signature-style': 'off',
|
|
191
|
-
/** 同 JS 规则的 TS 版本 */
|
|
192
|
-
'@typescript-eslint/no-array-constructor': 'error',
|
|
193
|
-
/** 同 JS 规则的 TS 版本 */
|
|
194
|
-
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
195
|
-
/**
|
|
196
|
-
* 禁止定义空的接口
|
|
197
|
-
*/
|
|
198
|
-
'@typescript-eslint/no-empty-interface': 'error',
|
|
199
|
-
/**
|
|
200
|
-
* 禁止给一个初始化时直接赋值为 number, string 的变量显式的声明类型
|
|
201
|
-
* @reason 可以简化代码
|
|
202
|
-
*/
|
|
203
|
-
'@typescript-eslint/no-inferrable-types': 'warn',
|
|
204
|
-
/**
|
|
205
|
-
* 禁止使用 namespace 来定义命名空间
|
|
206
|
-
* @reason 使用 es6 引入模块,才是更标准的方式。
|
|
207
|
-
* 但是允许使用 declare namespace ... {} 来定义外部命名空间
|
|
208
|
-
*/
|
|
209
|
-
'@typescript-eslint/no-namespace': [
|
|
210
|
-
'error',
|
|
211
|
-
{
|
|
212
|
-
allowDeclarations: true,
|
|
213
|
-
allowDefinitionFiles: true,
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
/**
|
|
217
|
-
* 禁止在 optional chaining 之后使用 non-null 断言(感叹号)
|
|
218
|
-
* @reason optional chaining 后面的属性一定是非空的
|
|
219
|
-
*/
|
|
220
|
-
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
221
|
-
/**
|
|
222
|
-
* 禁止给类的构造函数的参数添加修饰符
|
|
223
|
-
*/
|
|
224
|
-
'@typescript-eslint/no-parameter-properties': 'off',
|
|
225
|
-
/**
|
|
226
|
-
* 禁止使用 require
|
|
227
|
-
* @reason 统一使用 import 来引入模块,特殊情况使用单行注释允许 require 引入
|
|
228
|
-
*/
|
|
229
|
-
'@typescript-eslint/no-require-imports': 'error',
|
|
230
|
-
/**
|
|
231
|
-
* 禁止将 this 赋值给其他变量,除非是解构赋值
|
|
232
|
-
*/
|
|
233
|
-
'@typescript-eslint/no-this-alias': [
|
|
234
|
-
'error',
|
|
235
|
-
{
|
|
236
|
-
allowDestructuring: true,
|
|
237
|
-
},
|
|
238
|
-
],
|
|
239
|
-
/**
|
|
240
|
-
* 禁止无用的表达式
|
|
241
|
-
*/
|
|
242
|
-
'@typescript-eslint/no-unused-expressions': [
|
|
243
|
-
'error',
|
|
244
|
-
{
|
|
245
|
-
allowShortCircuit: true,
|
|
246
|
-
allowTernary: true,
|
|
247
|
-
allowTaggedTemplates: true,
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
/** 同 JS 规则的 TS 版本 */
|
|
251
|
-
'@typescript-eslint/no-unused-vars': [
|
|
252
|
-
'error',
|
|
253
|
-
{
|
|
254
|
-
args: 'after-used',
|
|
255
|
-
ignoreRestSiblings: true,
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
/**
|
|
259
|
-
* 禁止出现没必要的 constructor
|
|
260
|
-
*/
|
|
261
|
-
'@typescript-eslint/no-useless-constructor': 'warn',
|
|
262
|
-
/**
|
|
263
|
-
* 使用 for 循环遍历数组时,如果索引仅用于获取成员,则必须使用 for of 循环替代 for 循环
|
|
264
|
-
* @reason for of 循环更加易读
|
|
265
|
-
*/
|
|
266
|
-
'@typescript-eslint/prefer-for-of': 'warn',
|
|
267
|
-
/**
|
|
268
|
-
* 使用函数类型别名替代包含函数调用声明的接口
|
|
269
|
-
*/
|
|
270
|
-
'@typescript-eslint/prefer-function-type': 'warn',
|
|
271
|
-
/**
|
|
272
|
-
* 禁止使用 module 来定义命名空间
|
|
273
|
-
* @reason module 已成为 js 的关键字
|
|
274
|
-
*/
|
|
275
|
-
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
|
276
|
-
/**
|
|
277
|
-
* 使用 optional chaining 替代 &&
|
|
278
|
-
*/
|
|
279
|
-
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
280
|
-
/** 同 JS 规则的 TS 版本 */
|
|
281
|
-
'@typescript-eslint/quotes': [
|
|
282
|
-
'warn',
|
|
283
|
-
'single',
|
|
284
|
-
{
|
|
285
|
-
allowTemplateLiterals: false,
|
|
286
|
-
},
|
|
287
|
-
],
|
|
288
|
-
/** 同 JS 规则的 TS 版本 */
|
|
289
|
-
'@typescript-eslint/semi': [
|
|
290
|
-
'error',
|
|
291
|
-
'always',
|
|
292
|
-
],
|
|
293
|
-
/** 同 JS 规则的 TS 版本 */
|
|
294
|
-
'@typescript-eslint/space-before-function-paren': [
|
|
295
|
-
'error',
|
|
296
|
-
{
|
|
297
|
-
anonymous: 'always',
|
|
298
|
-
named: 'never',
|
|
299
|
-
asyncArrow: 'always',
|
|
300
|
-
},
|
|
301
|
-
],
|
|
302
|
-
/**
|
|
303
|
-
* 禁止使用三斜杠导入文件
|
|
304
|
-
* @reason 三斜杠是已废弃的语法,但在类型声明文件中还是可以使用的
|
|
305
|
-
*/
|
|
306
|
-
'@typescript-eslint/triple-slash-reference': [
|
|
307
|
-
'error',
|
|
308
|
-
{
|
|
309
|
-
path: 'never',
|
|
310
|
-
types: 'always',
|
|
311
|
-
lib: 'always',
|
|
312
|
-
},
|
|
313
|
-
],
|
|
314
|
-
/**
|
|
315
|
-
* 在类型注释周围需要一致的间距
|
|
316
|
-
*/
|
|
317
|
-
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
318
|
-
/**
|
|
319
|
-
* interface 和 type 定义时必须声明成员的类型
|
|
320
|
-
*/
|
|
321
|
-
'@typescript-eslint/typedef': [
|
|
322
|
-
'error',
|
|
323
|
-
{
|
|
324
|
-
arrayDestructuring: false,
|
|
325
|
-
arrowParameter: false,
|
|
326
|
-
memberVariableDeclaration: false,
|
|
327
|
-
objectDestructuring: false,
|
|
328
|
-
parameter: false,
|
|
329
|
-
propertyDeclaration: true,
|
|
330
|
-
variableDeclaration: false,
|
|
331
|
-
},
|
|
332
|
-
],
|
|
333
|
-
/**
|
|
334
|
-
* 函数重载时,若能通过联合类型将两个函数的类型声明合为一个,则使用联合类型而不是两个函数声明
|
|
335
|
-
*/
|
|
336
|
-
'@typescript-eslint/unified-signatures': 'error' },
|
|
337
|
-
};
|
|
27
|
+
extends: ['eslint-config-tencent', 'eslint-config-tencent/ts'],
|
|
28
|
+
}
|
package/tsvue.js
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
1
26
|
const rules = require('./vue.rule');
|
|
2
27
|
|
|
3
28
|
module.exports = {
|
|
@@ -13,7 +38,7 @@ module.exports = {
|
|
|
13
38
|
jsx: true,
|
|
14
39
|
},
|
|
15
40
|
},
|
|
16
|
-
extends: ['plugin:vue/recommended', '@vue/typescript', './vue.js', './ts.js'],
|
|
41
|
+
extends: ['plugin:vue/recommended', '@vue/typescript','plugin:prettier/recommended', './vue.js', './ts.js'],
|
|
17
42
|
plugins: ['vue'],
|
|
18
43
|
rules,
|
|
19
44
|
settings: {
|
package/tsvue3.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
const rules = require('./vue3.rule');
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
root: true,
|
|
30
|
+
parser: 'vue-eslint-parser',
|
|
31
|
+
parserOptions: {
|
|
32
|
+
parser: '@typescript-eslint/parser',
|
|
33
|
+
sourceType: 'module',
|
|
34
|
+
ecmaVersion: 2019,
|
|
35
|
+
ecmaFeatures: {
|
|
36
|
+
globalReturn: false,
|
|
37
|
+
impliedStrict: false,
|
|
38
|
+
jsx: true,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
extends: ['plugin:vue/vue3-recommended', '@vue/typescript', './vue3.js', './ts.js', 'plugin:prettier/recommended',],
|
|
42
|
+
plugins: ['vue','prettier'],
|
|
43
|
+
rules,
|
|
44
|
+
settings: {
|
|
45
|
+
'import/extensions': [
|
|
46
|
+
'.js',
|
|
47
|
+
'.jsx',
|
|
48
|
+
'.ts',
|
|
49
|
+
'.tsx',
|
|
50
|
+
'.vue',
|
|
51
|
+
],
|
|
52
|
+
'import/parsers': {
|
|
53
|
+
'vue-eslint-parser': ['.vue'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
package/vue.js
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
1
26
|
const rules = require('./vue.rule');
|
|
2
27
|
|
|
3
28
|
module.exports = {
|
package/vue.rule.js
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
1
26
|
module.exports = {
|
|
2
27
|
// https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/array-bracket-spacing.md
|
|
3
28
|
'vue/array-bracket-spacing': ['error', 'never'],
|
package/vue3.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
|
8
|
+
*
|
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
|
10
|
+
*
|
|
11
|
+
* ---------------------------------------------------
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
18
|
+
* the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
24
|
+
* IN THE SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
const rules = require('./vue3.rule');
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
root: true,
|
|
30
|
+
parser: 'vue-eslint-parser',
|
|
31
|
+
parserOptions: {
|
|
32
|
+
parser: '@babel/eslint-parser',
|
|
33
|
+
sourceType: 'module',
|
|
34
|
+
},
|
|
35
|
+
extends: ['plugin:vue/vue3-recommended', './index.js'],
|
|
36
|
+
plugins: ['vue'],
|
|
37
|
+
rules,
|
|
38
|
+
settings: {
|
|
39
|
+
'import/extensions': [
|
|
40
|
+
'.js',
|
|
41
|
+
'.jsx',
|
|
42
|
+
'.vue',
|
|
43
|
+
],
|
|
44
|
+
'import/parsers': {
|
|
45
|
+
'vue-eslint-parser': ['.vue'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|