diff --git a/package-lock.json b/package-lock.json index 85a587728..b7ab053ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5373,9 +5373,9 @@ "dev": true }, "typescript": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", - "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", + "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index ee4811c45..16ea52482 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "standard-version": "7.0.0", "ts-node": "8.4.1", "tslint": "5.20.0", - "typescript": "3.4.5", + "typescript": "~3.6.0", "zone.js": "0.10.2" }, "peerDependencies": { diff --git a/src/contextualDecoratorRule.ts b/src/contextualDecoratorRule.ts index 7a50d56a9..883e2e21a 100644 --- a/src/contextualDecoratorRule.ts +++ b/src/contextualDecoratorRule.ts @@ -73,7 +73,7 @@ const getClassDecoratorName = (klass: Node): AngularClassDecoratorKeys | undefin }; const isDeclarationLike = (node: Node): node is DeclarationLike => { - return isAccessor(node) || isMethodDeclaration(node) || isParameterPropertyDeclaration(node) || isPropertyDeclaration(node); + return isAccessor(node) || isMethodDeclaration(node) || isParameterPropertyDeclaration(node, node.parent) || isPropertyDeclaration(node); }; const validateDeclaration = (walkContext: WalkContext, node: DeclarationLike): void => { diff --git a/src/preferInlineDecoratorRule.ts b/src/preferInlineDecoratorRule.ts index 517a79c15..d84066298 100644 --- a/src/preferInlineDecoratorRule.ts +++ b/src/preferInlineDecoratorRule.ts @@ -196,9 +196,9 @@ const callbackHandler = (walkContext: WalkContext, node: Node) validateGetAccessorDeclaration(walkContext, node); } else if (methods && isMethodDeclaration(node)) { validateMethodDeclaration(walkContext, node); - } else if (parameters && isParameter(node) && !isParameterPropertyDeclaration(node)) { + } else if (parameters && isParameter(node) && !isParameterPropertyDeclaration(node, node.parent)) { validateParameterDeclaration(walkContext, node); - } else if (parameterProperties && isParameterPropertyDeclaration(node)) { + } else if (parameterProperties && isParameterPropertyDeclaration(node, node.parent)) { validateParameterPropertyDeclaration(walkContext, node); } else if (properties && isPropertyDeclaration(node)) { validatePropertyDeclaration(walkContext, node); diff --git a/src/templateAccessibilityLabelForRule.ts b/src/templateAccessibilityLabelForRule.ts index 3ac689888..32282c00b 100644 --- a/src/templateAccessibilityLabelForRule.ts +++ b/src/templateAccessibilityLabelForRule.ts @@ -133,9 +133,9 @@ class TemplateVisitorCtrl extends BasicTemplateAstVisitor { const { controlComponents, labelAttributes, labelComponents } = (options.ruleArguments[0] || {}) as OptionDictionary; - this.controlComponents = new Set([...DEFAULT_CONTROL_COMPONENTS, ...controlComponents]); - this.labelAttributes = new Set([...DEFAULT_LABEL_ATTRIBUTES, ...labelAttributes]); - this.labelComponents = new Set([...DEFAULT_LABEL_COMPONENTS, ...labelComponents]); + this.controlComponents = new Set([...DEFAULT_CONTROL_COMPONENTS.concat(controlComponents)]); + this.labelAttributes = new Set([...DEFAULT_LABEL_ATTRIBUTES.concat(labelAttributes)]); + this.labelComponents = new Set([...DEFAULT_LABEL_COMPONENTS.concat(labelComponents)]); } visitElement(element: ElementAst, context: any): any { diff --git a/src/util/isInteractiveElement.ts b/src/util/isInteractiveElement.ts index a29d3a45f..0fa509dc4 100644 --- a/src/util/isInteractiveElement.ts +++ b/src/util/isInteractiveElement.ts @@ -28,14 +28,14 @@ const interactiveRoles: any = new Set( }) ); -const nonInteractiveElementRoleSchemas = elementRoleEntries.reduce((accumulator: any, [elementSchema, roleSet]: any) => { +const nonInteractiveElementRoleSchemas = elementRoleEntries.reduce((accumulator: any[], [elementSchema, roleSet]: any) => { if (Array.from(roleSet).every((role): boolean => nonInteractiveRoles.has(role))) { accumulator.push(elementSchema); } return accumulator; }, []); -const interactiveElementRoleSchemas = elementRoleEntries.reduce((accumulator: any, [elementSchema, roleSet]: any) => { +const interactiveElementRoleSchemas = elementRoleEntries.reduce((accumulator: any[], [elementSchema, roleSet]: any) => { if (Array.from(roleSet).some((role): boolean => interactiveRoles.has(role))) { accumulator.push(elementSchema); } @@ -44,7 +44,7 @@ const interactiveElementRoleSchemas = elementRoleEntries.reduce((accumulator: an const interactiveAXObjects = new Set(Array.from(AXObjects.keys()).filter(name => AXObjects.get(name).type === 'widget')); -const interactiveElementAXObjectSchemas = Array.from(elementAXObjects).reduce((accumulator: any, [elementSchema, AXObjectSet]: any) => { +const interactiveElementAXObjectSchemas = Array.from(elementAXObjects).reduce((accumulator: any[], [elementSchema, AXObjectSet]: any) => { if (Array.from(AXObjectSet).every((role): boolean => interactiveAXObjects.has(role))) { accumulator.push(elementSchema); }