Skip to content

Commit c0db9b7

Browse files
committed
fix: fix typecheck
1 parent 87bb3ec commit c0db9b7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/rules/no-duplicate-attr-inheritance.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
const options = context.options[0] || {}
6464
const checkMultiRootNodes = options.checkMultiRootNodes === true
6565

66-
/** @type {string | number | boolean | RegExp | BigInt | null} */
66+
/** @type {Literal['value']} */
6767
let inheritsAttrs = true
6868
/** @type {VReference[]} */
6969
const attrsRefs = []

lib/rules/no-unused-refs.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,11 @@ module.exports = {
237237
CallExpression(callExpression) {
238238
const firstArgument = callExpression.arguments[0]
239239
if (
240-
callExpression.callee.name !== 'useTemplateRef' ||
241-
!firstArgument
240+
('name' in callExpression.callee &&
241+
callExpression.callee.name !== 'useTemplateRef') ||
242+
!firstArgument ||
243+
(firstArgument.type !== 'Literal' &&
244+
firstArgument.type !== 'TemplateLiteral')
242245
) {
243246
return
244247
}

0 commit comments

Comments
 (0)