diff --git a/lib/rules/require-valid-default-prop.js b/lib/rules/require-valid-default-prop.js index 2b711b56c..ab0355206 100644 --- a/lib/rules/require-valid-default-prop.js +++ b/lib/rules/require-valid-default-prop.js @@ -427,7 +427,7 @@ module.exports = { } } }, - onDefinePropsExit(node) { + onDefinePropsExit() { scriptSetupPropsContexts.pop() } }) diff --git a/typings/eslint-plugin-vue/util-types/ast/es-ast.ts b/typings/eslint-plugin-vue/util-types/ast/es-ast.ts index 26c433a2e..ba320a979 100644 --- a/typings/eslint-plugin-vue/util-types/ast/es-ast.ts +++ b/typings/eslint-plugin-vue/util-types/ast/es-ast.ts @@ -441,12 +441,21 @@ export type BinaryOperator = | 'in' | 'instanceof' | '**' -export interface BinaryExpression extends HasParentNode { +interface BinaryExpressionWithoutIn extends HasParentNode { type: 'BinaryExpression' - operator: BinaryOperator + operator: Exclude left: Expression right: Expression } +interface BinaryExpressionWithIn extends HasParentNode { + type: 'BinaryExpression' + operator: 'in' + left: Expression | PrivateIdentifier + right: Expression +} +export type BinaryExpression = + | BinaryExpressionWithoutIn + | BinaryExpressionWithIn export type AssignmentOperator = | '=' | '+='