@foundbyte/eslint-plugin 1.1.4-alpha → 1.1.4-alpha.2
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/lib/rules/no-excessive-any.js +360 -20
- package/package.json +1 -1
|
@@ -32,6 +32,14 @@ module.exports = {
|
|
|
32
32
|
// 存储 any 类型使用的位置
|
|
33
33
|
const anyUsages = []
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* 检查文件路径是否应该被排除
|
|
37
|
+
*/
|
|
38
|
+
function shouldExcludeFile() {
|
|
39
|
+
// 不再排除任何文件,所有文件都检查
|
|
40
|
+
return false
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
/**
|
|
36
44
|
* 递归检查类型节点中的 any 类型
|
|
37
45
|
*/
|
|
@@ -79,25 +87,65 @@ module.exports = {
|
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
/**
|
|
83
|
-
* 检查 TSAnyKeyword 节点(显式 any 类型)
|
|
84
|
-
*/
|
|
85
|
-
function checkTSAnyKeyword(node) {
|
|
86
|
-
anyUsages.push({
|
|
87
|
-
node,
|
|
88
|
-
type: 'explicit',
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
90
|
/**
|
|
93
91
|
* 检查类型注解中的 any 类型
|
|
94
92
|
*/
|
|
95
93
|
function checkTypeAnnotation(node) {
|
|
94
|
+
if (shouldExcludeFile()) return
|
|
96
95
|
if (node.typeAnnotation && node.typeAnnotation.typeAnnotation) {
|
|
97
96
|
checkTypeNodeForAny(node.typeAnnotation.typeAnnotation, node)
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
|
|
100
|
+
/**
|
|
101
|
+
* 检查是否是内置函数
|
|
102
|
+
*/
|
|
103
|
+
function isBuiltInFunction(node) {
|
|
104
|
+
if (node.type !== 'CallExpression') return false
|
|
105
|
+
|
|
106
|
+
// 检查全局对象的方法调用,如 JSON.parse, Promise.all 等
|
|
107
|
+
if (node.callee.type === 'MemberExpression' && node.callee.object.type === 'Identifier') {
|
|
108
|
+
const objectName = node.callee.object.name
|
|
109
|
+
|
|
110
|
+
// 内置全局对象列表 - 这些对象的所有方法都认为是内置的
|
|
111
|
+
const builtInObjects = ['JSON', 'Promise', 'Array', 'Object', 'String', 'Number', 'Boolean', 'Date', 'Math', 'RegExp', 'Map', 'Set', 'WeakMap', 'WeakSet']
|
|
112
|
+
|
|
113
|
+
if (builtInObjects.includes(objectName)) {
|
|
114
|
+
// 对于这些内置对象,假设它们的所有方法都是内置的
|
|
115
|
+
// 这样可以避免维护庞大的方法列表
|
|
116
|
+
return true
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 检查可选链调用,如 spotArr?.find()
|
|
121
|
+
if (node.callee.type === 'ChainExpression' && node.callee.expression.type === 'CallExpression') {
|
|
122
|
+
const chainCall = node.callee.expression
|
|
123
|
+
if (chainCall.callee.type === 'MemberExpression' && chainCall.callee.object.type === 'Identifier') {
|
|
124
|
+
const objectName = chainCall.callee.object.name
|
|
125
|
+
|
|
126
|
+
// 内置全局对象列表
|
|
127
|
+
const builtInObjects = ['JSON', 'Promise', 'Array', 'Object', 'String', 'Number', 'Boolean', 'Date', 'Math', 'RegExp', 'Map', 'Set', 'WeakMap', 'WeakSet']
|
|
128
|
+
|
|
129
|
+
if (builtInObjects.includes(objectName)) {
|
|
130
|
+
// 对于这些内置对象,假设它们的所有方法都是内置的
|
|
131
|
+
return true
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 检查全局函数调用,如 parseInt, parseFloat, isNaN 等
|
|
137
|
+
if (node.callee.type === 'Identifier') {
|
|
138
|
+
const functionName = node.callee.name
|
|
139
|
+
const globalFunctions = [
|
|
140
|
+
'parseInt', 'parseFloat', 'isNaN', 'isFinite', 'eval', 'encodeURI',
|
|
141
|
+
'encodeURIComponent', 'decodeURI', 'decodeURIComponent', 'escape', 'unescape'
|
|
142
|
+
]
|
|
143
|
+
return globalFunctions.includes(functionName)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return false
|
|
147
|
+
}
|
|
148
|
+
|
|
101
149
|
/**
|
|
102
150
|
* 检查表达式是否可以推导类型
|
|
103
151
|
*/
|
|
@@ -126,12 +174,46 @@ module.exports = {
|
|
|
126
174
|
|
|
127
175
|
// 函数调用:检查参数是否可以推导类型
|
|
128
176
|
if (node.type === 'CallExpression') {
|
|
129
|
-
//
|
|
130
|
-
if (node
|
|
131
|
-
return
|
|
177
|
+
// 检查是否是第三方库函数调用
|
|
178
|
+
if (isThirdPartyFunctionCall(node)) {
|
|
179
|
+
return true // 第三方库函数调用,假设可以推导类型
|
|
132
180
|
}
|
|
133
|
-
|
|
134
|
-
|
|
181
|
+
|
|
182
|
+
// 检查是否是 Vue 响应式函数调用且有明确的类型参数
|
|
183
|
+
if (isTypedVueReactiveCall(node)) {
|
|
184
|
+
return true // 有明确的类型参数,可以推导类型
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 检查是否是 Vue 响应式函数(无论是否有类型参数)
|
|
188
|
+
if (isVueReactiveFunction(node)) {
|
|
189
|
+
// 对于 Vue 响应式函数调用,需要检查是否有参数可以推导类型
|
|
190
|
+
if (node.arguments && node.arguments.length > 0) {
|
|
191
|
+
// 如果有参数,并且所有参数都可以推导类型,则认为可以推导返回类型
|
|
192
|
+
return node.arguments.every(arg => canInferTypeFromExpression(arg))
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// 检查是否有类型参数(通过源代码文本检查)
|
|
196
|
+
// 由于 Vue SFC 文件中的 TypeScript 泛型可能没有被正确解析为 AST 节点,
|
|
197
|
+
// 我们通过检查源代码文本来判断是否有类型参数
|
|
198
|
+
const sourceCode = context.getSourceCode()
|
|
199
|
+
const callText = sourceCode.getText(node)
|
|
200
|
+
|
|
201
|
+
// 检查调用文本中是否包含泛型类型参数(如 <string>)
|
|
202
|
+
const hasTypeParameters = callText.includes('<') && callText.includes('>')
|
|
203
|
+
|
|
204
|
+
// 没有参数的 Vue 响应式函数调用,如果有类型参数,可以推导类型
|
|
205
|
+
// 如 ref<string>() 可以推导为 Ref<string | undefined>
|
|
206
|
+
if (hasTypeParameters) {
|
|
207
|
+
return true
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 没有类型参数也没有参数的 Vue 响应式函数调用(如 ref())无法推导类型
|
|
211
|
+
return false
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// 对于其他函数调用,假设可以推导类型
|
|
215
|
+
// 因为本地函数有明确的返回类型,TypeScript 可以推导
|
|
216
|
+
return true
|
|
135
217
|
}
|
|
136
218
|
|
|
137
219
|
// 属性访问通常可以推导类型(如 ref.value)
|
|
@@ -139,6 +221,11 @@ module.exports = {
|
|
|
139
221
|
return true
|
|
140
222
|
}
|
|
141
223
|
|
|
224
|
+
// 可选链表达式可以推导类型(如 spotArr?.find())
|
|
225
|
+
if (node.type === 'ChainExpression') {
|
|
226
|
+
return true
|
|
227
|
+
}
|
|
228
|
+
|
|
142
229
|
// await 表达式可以推导类型(等待 Promise 的结果)
|
|
143
230
|
if (node.type === 'AwaitExpression') {
|
|
144
231
|
return true
|
|
@@ -148,10 +235,153 @@ module.exports = {
|
|
|
148
235
|
return false
|
|
149
236
|
}
|
|
150
237
|
|
|
238
|
+
/**
|
|
239
|
+
* 检查是否是第三方库函数调用
|
|
240
|
+
*/
|
|
241
|
+
function isThirdPartyFunctionCall(node) {
|
|
242
|
+
if (node.type !== 'CallExpression') return false
|
|
243
|
+
|
|
244
|
+
// 检查是否是内置函数
|
|
245
|
+
if (isBuiltInFunction(node)) {
|
|
246
|
+
return true
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// 获取当前文件的导入信息
|
|
250
|
+
const imports = getImportsForCurrentFile()
|
|
251
|
+
|
|
252
|
+
// 检查标识符调用,如 isEqualWith(a, b)
|
|
253
|
+
if (node.callee.type === 'Identifier') {
|
|
254
|
+
const functionName = node.callee.name
|
|
255
|
+
const importInfo = imports.find(imp => imp.localName === functionName)
|
|
256
|
+
|
|
257
|
+
if (importInfo) {
|
|
258
|
+
// 检查导入的模块是否在排除模式中
|
|
259
|
+
return isModuleExcluded(importInfo.modulePath)
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// 检查成员表达式调用,如 lodash.isEqualWith(a, b)
|
|
264
|
+
if (node.callee.type === 'MemberExpression' && node.callee.object.type === 'Identifier') {
|
|
265
|
+
const objectName = node.callee.object.name
|
|
266
|
+
const importInfo = imports.find(imp => imp.localName === objectName)
|
|
267
|
+
|
|
268
|
+
if (importInfo) {
|
|
269
|
+
// 检查导入的模块是否在排除模式中
|
|
270
|
+
return isModuleExcluded(importInfo.modulePath)
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return false
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* 检查是否是内置函数
|
|
279
|
+
*/
|
|
280
|
+
function isBuiltInFunction(node) {
|
|
281
|
+
if (node.type !== 'CallExpression') return false
|
|
282
|
+
|
|
283
|
+
// 检查全局对象的方法调用,如 JSON.parse, Promise.all 等
|
|
284
|
+
if (node.callee.type === 'MemberExpression' && node.callee.object.type === 'Identifier') {
|
|
285
|
+
const objectName = node.callee.object.name
|
|
286
|
+
const propertyName = node.callee.property.type === 'Identifier' ? node.callee.property.name : ''
|
|
287
|
+
|
|
288
|
+
// 内置全局对象列表
|
|
289
|
+
const builtInObjects = ['JSON', 'Promise', 'Array', 'Object', 'String', 'Number', 'Boolean', 'Date', 'Math', 'RegExp', 'Map', 'Set', 'WeakMap', 'WeakSet']
|
|
290
|
+
|
|
291
|
+
if (builtInObjects.includes(objectName)) {
|
|
292
|
+
// 对于这些内置对象,假设它们的所有方法都是内置的
|
|
293
|
+
// 这样可以避免维护庞大的方法列表
|
|
294
|
+
return true
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// 检查可选链调用,如 spotArr?.find()
|
|
299
|
+
if (node.callee.type === 'ChainExpression' && node.callee.expression.type === 'CallExpression') {
|
|
300
|
+
const chainCall = node.callee.expression
|
|
301
|
+
if (chainCall.callee.type === 'MemberExpression' && chainCall.callee.object.type === 'Identifier') {
|
|
302
|
+
const objectName = chainCall.callee.object.name
|
|
303
|
+
|
|
304
|
+
// 内置全局对象列表
|
|
305
|
+
const builtInObjects = ['JSON', 'Promise', 'Array', 'Object', 'String', 'Number', 'Boolean', 'Date', 'Math', 'RegExp', 'Map', 'Set', 'WeakMap', 'WeakSet']
|
|
306
|
+
|
|
307
|
+
if (builtInObjects.includes(objectName)) {
|
|
308
|
+
// 对于这些内置对象,假设它们的所有方法都是内置的
|
|
309
|
+
return true
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// 检查全局函数调用,如 parseInt, parseFloat, isNaN 等
|
|
315
|
+
if (node.callee.type === 'Identifier') {
|
|
316
|
+
const functionName = node.callee.name
|
|
317
|
+
const globalFunctions = [
|
|
318
|
+
'parseInt', 'parseFloat', 'isNaN', 'isFinite', 'eval', 'encodeURI',
|
|
319
|
+
'encodeURIComponent', 'decodeURI', 'decodeURIComponent', 'escape', 'unescape'
|
|
320
|
+
]
|
|
321
|
+
return globalFunctions.includes(functionName)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return false
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* 检查模块路径是否应该被排除
|
|
329
|
+
*/
|
|
330
|
+
function isModuleExcluded(modulePath) {
|
|
331
|
+
// 检查是否是第三方模块(不以 ./ 或 ../ 开头)
|
|
332
|
+
const isThirdPartyModule = !modulePath.startsWith('./') && !modulePath.startsWith('../')
|
|
333
|
+
|
|
334
|
+
if (isThirdPartyModule) {
|
|
335
|
+
return true // 所有第三方模块都排除
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return false
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* 获取当前文件的导入信息
|
|
343
|
+
*/
|
|
344
|
+
function getImportsForCurrentFile() {
|
|
345
|
+
const imports = []
|
|
346
|
+
const programNode = context.getSourceCode().ast
|
|
347
|
+
|
|
348
|
+
// 遍历所有导入声明
|
|
349
|
+
programNode.body.forEach(node => {
|
|
350
|
+
if (node.type === 'ImportDeclaration') {
|
|
351
|
+
const modulePath = node.source.value
|
|
352
|
+
|
|
353
|
+
node.specifiers.forEach(specifier => {
|
|
354
|
+
if (specifier.type === 'ImportSpecifier') {
|
|
355
|
+
imports.push({
|
|
356
|
+
localName: specifier.local.name,
|
|
357
|
+
importedName: specifier.imported.name,
|
|
358
|
+
modulePath: modulePath
|
|
359
|
+
})
|
|
360
|
+
} else if (specifier.type === 'ImportDefaultSpecifier') {
|
|
361
|
+
imports.push({
|
|
362
|
+
localName: specifier.local.name,
|
|
363
|
+
importedName: 'default',
|
|
364
|
+
modulePath: modulePath
|
|
365
|
+
})
|
|
366
|
+
} else if (specifier.type === 'ImportNamespaceSpecifier') {
|
|
367
|
+
imports.push({
|
|
368
|
+
localName: specifier.local.name,
|
|
369
|
+
importedName: '*',
|
|
370
|
+
modulePath: modulePath
|
|
371
|
+
})
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
})
|
|
376
|
+
|
|
377
|
+
return imports
|
|
378
|
+
}
|
|
379
|
+
|
|
151
380
|
/**
|
|
152
381
|
* 检查变量声明中的隐式 any 类型
|
|
153
382
|
*/
|
|
154
383
|
function checkVariableDeclaration(node) {
|
|
384
|
+
if (shouldExcludeFile()) return
|
|
155
385
|
// 遍历所有声明
|
|
156
386
|
node.declarations.forEach(declaration => {
|
|
157
387
|
if (declaration.id && declaration.id.type === 'Identifier') {
|
|
@@ -182,10 +412,14 @@ module.exports = {
|
|
|
182
412
|
declaration.init.type === 'ArrowFunctionExpression'
|
|
183
413
|
|
|
184
414
|
if (!isFunctionDeclaration) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
415
|
+
// 检查是否是简单的 Map/Set 实例化,这些可以通过上下文推导类型
|
|
416
|
+
const isSimpleCollection = isSimpleCollectionInstantiation(declaration.init)
|
|
417
|
+
if (!isSimpleCollection) {
|
|
418
|
+
anyUsages.push({
|
|
419
|
+
node: declaration,
|
|
420
|
+
type: 'implicit',
|
|
421
|
+
})
|
|
422
|
+
}
|
|
189
423
|
}
|
|
190
424
|
}
|
|
191
425
|
}
|
|
@@ -198,10 +432,114 @@ module.exports = {
|
|
|
198
432
|
})
|
|
199
433
|
}
|
|
200
434
|
|
|
435
|
+
/**
|
|
436
|
+
* 检查是否是 Vue 响应式函数(无论是否有类型参数)
|
|
437
|
+
*/
|
|
438
|
+
function isVueReactiveFunction(node) {
|
|
439
|
+
if (!node || node.type !== 'CallExpression') return false
|
|
440
|
+
|
|
441
|
+
// 检查是否是 ref() 或 reactive() 调用
|
|
442
|
+
if (node.callee.type === 'Identifier') {
|
|
443
|
+
const functionName = node.callee.name
|
|
444
|
+
const vueReactiveFunctions = ['ref', 'reactive', 'computed', 'watch', 'watchEffect']
|
|
445
|
+
|
|
446
|
+
return vueReactiveFunctions.includes(functionName)
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
return false
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* 检查是否是 Vue 响应式函数调用且有明确的类型参数
|
|
454
|
+
* 这个函数专门处理所有有类型参数的 Vue 响应式函数调用
|
|
455
|
+
*/
|
|
456
|
+
function isTypedVueReactiveCall(node) {
|
|
457
|
+
if (!node || node.type !== 'CallExpression') return false
|
|
458
|
+
|
|
459
|
+
// 检查是否是 Vue 响应式函数调用
|
|
460
|
+
if (node.callee.type === 'Identifier') {
|
|
461
|
+
const functionName = node.callee.name
|
|
462
|
+
const vueReactiveFunctions = ['ref', 'reactive', 'computed', 'watch', 'watchEffect']
|
|
463
|
+
|
|
464
|
+
if (vueReactiveFunctions.includes(functionName)) {
|
|
465
|
+
// 检查是否有类型参数(TypeScript 泛型)
|
|
466
|
+
if (node.typeParameters && node.typeParameters.params && node.typeParameters.params.length > 0) {
|
|
467
|
+
return true // 有明确的类型参数
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
return false
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* 检查是否是简单的集合实例化(如 new Map(), new Set())
|
|
477
|
+
* 这些可以通过上下文推导类型,不应该算作隐式 any
|
|
478
|
+
*/
|
|
479
|
+
function isSimpleCollectionInstantiation(node) {
|
|
480
|
+
if (!node) return false
|
|
481
|
+
|
|
482
|
+
// 检查 new Map() 或 new Set()
|
|
483
|
+
if (node.type === 'NewExpression') {
|
|
484
|
+
const calleeName = node.callee.type === 'Identifier' ? node.callee.name : ''
|
|
485
|
+
if (calleeName === 'Map' || calleeName === 'Set') {
|
|
486
|
+
// 检查是否有参数(无参数的 new Map() 或 new Set() 是简单的实例化)
|
|
487
|
+
if (!node.arguments || node.arguments.length === 0) {
|
|
488
|
+
return true
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
return false
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* 检查函数声明中的 any 类型
|
|
498
|
+
*/
|
|
499
|
+
function checkFunctionDeclaration(node) {
|
|
500
|
+
if (shouldExcludeFile()) return
|
|
501
|
+
|
|
502
|
+
// 检查函数返回类型中的 any
|
|
503
|
+
if (node.returnType && node.returnType.typeAnnotation) {
|
|
504
|
+
checkTypeNodeForAny(node.returnType.typeAnnotation, node)
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// 检查函数参数类型中的 any
|
|
508
|
+
if (node.params) {
|
|
509
|
+
node.params.forEach(param => {
|
|
510
|
+
if (param.typeAnnotation) {
|
|
511
|
+
checkTypeAnnotation(param)
|
|
512
|
+
}
|
|
513
|
+
})
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* 检查箭头函数中的 any 类型
|
|
519
|
+
*/
|
|
520
|
+
function checkArrowFunctionExpression(node) {
|
|
521
|
+
if (shouldExcludeFile()) return
|
|
522
|
+
|
|
523
|
+
// 检查箭头函数返回类型中的 any
|
|
524
|
+
if (node.returnType && node.returnType.typeAnnotation) {
|
|
525
|
+
checkTypeNodeForAny(node.returnType.typeAnnotation, node)
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// 检查箭头函数参数类型中的 any
|
|
529
|
+
if (node.params) {
|
|
530
|
+
node.params.forEach(param => {
|
|
531
|
+
if (param.typeAnnotation) {
|
|
532
|
+
checkTypeAnnotation(param)
|
|
533
|
+
}
|
|
534
|
+
})
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
201
538
|
/**
|
|
202
539
|
* 检查类型别名和接口中的 any 类型
|
|
203
540
|
*/
|
|
204
541
|
function checkTypeDeclaration(node) {
|
|
542
|
+
if (shouldExcludeFile()) return
|
|
205
543
|
if (node.typeAnnotation) {
|
|
206
544
|
checkTypeNodeForAny(node.typeAnnotation, node)
|
|
207
545
|
}
|
|
@@ -211,6 +549,7 @@ module.exports = {
|
|
|
211
549
|
* 在文件结束时检查 any 类型使用次数
|
|
212
550
|
*/
|
|
213
551
|
function checkAnyUsageCount() {
|
|
552
|
+
if (shouldExcludeFile()) return
|
|
214
553
|
if (anyUsages.length > maxAnyCount) {
|
|
215
554
|
// 报告第一个超出限制的 any 使用(第 maxAnyCount + 1 个)
|
|
216
555
|
const firstExceededUsage = anyUsages[maxAnyCount]
|
|
@@ -226,8 +565,9 @@ module.exports = {
|
|
|
226
565
|
}
|
|
227
566
|
|
|
228
567
|
return {
|
|
229
|
-
TSAnyKeyword: checkTSAnyKeyword,
|
|
230
568
|
VariableDeclaration: checkVariableDeclaration,
|
|
569
|
+
FunctionDeclaration: checkFunctionDeclaration,
|
|
570
|
+
ArrowFunctionExpression: checkArrowFunctionExpression,
|
|
231
571
|
TSTypeAliasDeclaration: checkTypeDeclaration,
|
|
232
572
|
TSInterfaceDeclaration: checkTypeDeclaration,
|
|
233
573
|
'Program:exit': checkAnyUsageCount,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foundbyte/eslint-plugin",
|
|
3
|
-
"version": "1.1.4-alpha",
|
|
3
|
+
"version": "1.1.4-alpha.2",
|
|
4
4
|
"description": "ESLint plugin for enforcing code style rules including arrow function padding, Vue script lines limit, and TypeScript type comment requirements",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|