@angular-eslint/eslint-plugin-template 12.6.2-alpha.4 → 12.7.0
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/CHANGELOG.md +6 -0
- package/dist/{index.d.ts → eslint-plugin-template/src/index.d.ts} +0 -0
- package/dist/{processors.d.ts → eslint-plugin-template/src/processors.d.ts} +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/accessibility-alt-text.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/accessibility-elements-content.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/accessibility-label-for.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/accessibility-label-has-associated-control.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/accessibility-table-scope.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/accessibility-valid-aria.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/banana-in-box.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/click-events-have-key-events.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/conditional-complexity.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/cyclomatic-complexity.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/eqeqeq.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/i18n.d.ts +2 -1
- package/dist/{rules → eslint-plugin-template/src/rules}/mouse-events-have-key-events.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-any.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-autofocus.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-call-expression.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-distracting-elements.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-duplicate-attributes.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-negated-async.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/no-positive-tabindex.d.ts +0 -0
- package/dist/{rules → eslint-plugin-template/src/rules}/use-track-by-function.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/attributes-comparator.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/constants.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/create-eslint-rule.d.ts +0 -1
- package/dist/{utils → eslint-plugin-template/src/utils}/get-attribute-value.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/get-dom-elements.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/get-nearest-node-from.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/get-original-attribute-name.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-child-node-of.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-hidden-from-screen-reader.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-interactive-element/get-interactive-element-ax-object-schemas.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-interactive-element/get-interactive-element-role-schemas.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-interactive-element/get-non-interactive-element-role-schemas.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-interactive-element/index.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/is-presentation-role.d.ts +0 -0
- package/dist/{utils → eslint-plugin-template/src/utils}/to-pattern.d.ts +0 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [12.7.0](https://github.com/angular-eslint/angular-eslint/compare/v12.6.1...v12.7.0) (2021-11-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **i18n:** option to require description for i18n metadata ([#804](https://github.com/angular-eslint/angular-eslint/issues/804)) ([7d072e2](https://github.com/angular-eslint/angular-eslint/commit/7d072e2ec053f388adce00be54c75d8c76373699))
|
|
11
|
+
|
|
6
12
|
## [12.6.1](https://github.com/angular-eslint/angular-eslint/compare/v12.6.0...v12.6.1) (2021-10-26)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,9 +7,10 @@ declare type Options = [
|
|
|
7
7
|
readonly checkText?: boolean;
|
|
8
8
|
readonly ignoreAttributes?: readonly string[];
|
|
9
9
|
readonly ignoreTags?: readonly string[];
|
|
10
|
+
readonly requireDescription?: boolean;
|
|
10
11
|
}
|
|
11
12
|
];
|
|
12
|
-
export declare type MessageIds = 'i18nAttribute' | 'i18nAttributeOnIcuOrText' | 'i18nCustomIdOnAttribute' | 'i18nCustomIdOnElement' | 'i18nDuplicateCustomId' | 'suggestAddI18nAttribute';
|
|
13
|
+
export declare type MessageIds = 'i18nAttribute' | 'i18nAttributeOnIcuOrText' | 'i18nCustomIdOnAttribute' | 'i18nCustomIdOnElement' | 'i18nDuplicateCustomId' | 'suggestAddI18nAttribute' | 'i18nMissingDescription';
|
|
13
14
|
export declare const RULE_NAME = "i18n";
|
|
14
15
|
declare const _default: TSESLint.RuleModule<MessageIds, Options, TSESLint.RuleListener>;
|
|
15
16
|
export default _default;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,6 @@ export declare const createESLintRule: <TOptions extends readonly unknown[], TMe
|
|
|
4
4
|
name: string;
|
|
5
5
|
meta: {
|
|
6
6
|
docs: {
|
|
7
|
-
category: "Best Practices" | "Stylistic Issues" | "Variables" | "Possible Errors";
|
|
8
7
|
description: string;
|
|
9
8
|
recommended: false | "error" | "warn";
|
|
10
9
|
suggestion?: boolean | undefined;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("typescript"),t=require("@typescript-eslint/experimental-utils/dist/eslint-utils"),n=require("@angular-eslint/bundled-angular-compiler"),r=require("aria-query");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(e);const s=new Map;var u={"extract-inline-html":{preprocess:function(e,t){const n=[e];if(!function(e,t){return!![".component.ts",".page.ts",".dialog.ts",".modal.ts",".popover.ts",".bottomsheet.ts",".snackbar.ts"].some(e=>t.endsWith(e))||!(!e.includes("Component")||!e.includes("@angular/core"))}(e,t))return n;try{const r=o.default.createSourceFile(t,e,o.default.ScriptTarget.Latest,!0),a=r.statements.filter(e=>o.default.isClassDeclaration(e));if(!a||!a.length)return n;const u=[];for(const e of a)if(e.decorators)for(const t of e.decorators)o.default.isCallExpression(t.expression)&&o.default.isIdentifier(t.expression.expression)&&"Component"===t.expression.expression.text&&u.push(t);if(!u||!u.length)return n;const i=[e];let c=0;for(const e of u){if(!o.default.isDecorator(e)||!o.default.isCallExpression(e.expression)||1!==e.expression.arguments.length)continue;const t=e.expression.arguments[0];if(!o.default.isObjectLiteralExpression(t))continue;const n=t.properties.find(e=>e&&e.name&&"template"===e.name.getText());if(t.properties.find(e=>e&&e.name&&"templateUrl"===e.name.getText())||!n)continue;if(!o.default.isPropertyAssignment(n))continue;let a;const u=n.initializer;if(o.default.isNoSubstitutionTemplateLiteral(u)&&(a=u.rawText),o.default.isTemplateExpression(u)&&(a=u.getText()),o.default.isStringLiteral(u)&&(a=u.text),!a)continue;const l=`inline-template-${++c}.component.html`,p=n.initializer.getStart(),m=n.initializer.getEnd();s.set(l,{range:[p,m],lineAndCharacter:{start:r.getLineAndCharacterOfPosition(p),end:r.getLineAndCharacterOfPosition(m)}}),i.push({text:a,filename:l})}return i}catch(e){return console.log(e),console.error("preprocess: ERROR could not parse @Component() metadata",t),n}},postprocess:function(e,t){const n=e[0];if(1===e.length)return n;const r=e.slice(1);return[...n,...[].concat(...r.map((e,t)=>{const n=`inline-template-${++t}.component.html`,r=s.get(n);return r?e.map(e=>{if(e.line=e.line+r.lineAndCharacter.start.line,e.endLine=e.endLine+r.lineAndCharacter.start.line,e.fix){const t=r.range[0];e.fix.range=[t+e.fix.range[0],t+e.fix.range[1]]}return e}):[]}))]},supportsAutofix:!0}};const i=(c=e=>`https://github.com/angular-eslint/angular-eslint/blob/master/packages/eslint-plugin/docs/rules/${e}.md`,function({name:e,meta:n,defaultOptions:r,create:a}){return{meta:Object.assign(Object.assign({},n),{docs:Object.assign(Object.assign({},n.docs),{url:c(e)})}),defaultOptions:r,create(e){const n=t.applyDefault(r,e.options);return a(e,n)}}});var c;function l(e){return p(e),e.parserServices}function p(e){var t,n;if(null==(t=e.parserServices)||!t.convertNodeSourceSpanToLoc||null==(n=e.parserServices)||!n.convertElementSourceSpanToLoc)throw new Error("You have used a rule which requires '@angular-eslint/template-parser' to be used as the 'parser' in your ESLint config.")}const m=Symbol("PROPERTY_READ");function d(e){var t;const{details:r}=null!=(t=e.keySpan)?t:{};return r?e instanceof n.TmplAstBoundEvent?function({keySpan:{details:e},name:t}){return t===`${e}Change`}(e)?e.name:r:r.replace("attr.",""):e.name}function g({attributes:e,inputs:t},r){const a=[...e,...t].find(e=>d(e)===r);if("string"==typeof(null==a?void 0:a.value))return a.value;if(!((null==a?void 0:a.value)instanceof n.ASTWithSource))return null;if(a.value.ast instanceof n.LiteralArray)return a.value.ast.expressions;if(a.value.ast instanceof n.LiteralMap){const{keys:e,values:t}=a.value.ast;return e.reduce((e,n,r)=>e.set(n.key,t[r]),new Map)}return a.value.ast instanceof n.LiteralPrimitive?a.value.ast.value:m}var f=i({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(img|area|object|input)$/]"(n){if(!function(e){return"img"===e.name?function(e){return e.attributes.some(({name:e})=>A(e))||e.inputs.some(({name:e})=>A(e))}(e):"object"===e.name?function(e){let t=!1,n=!1;for(const r of e.attributes)t="title"===r.name,n=S(r.name);if(t||n)return!0;let r=!1,a=!1;for(const t of e.inputs)r="title"===t.name,a=S(t.name);return!(!r&&!a)||e.children.length>0&&!!e.children[0].value}(e):"area"===e.name?y(e):function(e){return"image"!==g(e,"type")||y(e)}(e)}(n)){const r=t.convertElementSourceSpanToLoc(e,n);e.report({loc:r,messageId:"accessibilityAltText",data:{element:n.name}})}}}}});function y(e){let t=!1,n=!1;for(const r of e.attributes)t=A(r.name),n=S(r.name);if(t||n)return!0;let r=!1,a=!1;for(const t of e.inputs)r=A(t.name),a=S(t.name);return r||a}function S(e){return"aria-label"===e||"aria-labelledby"===e}function A(e){return"alt"===e}var T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e){var t={exports:{}};return e(t,t.exports),t.exports}var E=b(function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,(n=t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})).ArrayExpression="ArrayExpression",n.ArrayPattern="ArrayPattern",n.ArrowFunctionExpression="ArrowFunctionExpression",n.AssignmentExpression="AssignmentExpression",n.AssignmentPattern="AssignmentPattern",n.AwaitExpression="AwaitExpression",n.BinaryExpression="BinaryExpression",n.BlockStatement="BlockStatement",n.BreakStatement="BreakStatement",n.CallExpression="CallExpression",n.CatchClause="CatchClause",n.ChainExpression="ChainExpression",n.ClassBody="ClassBody",n.ClassDeclaration="ClassDeclaration",n.ClassExpression="ClassExpression",n.ClassProperty="ClassProperty",n.ConditionalExpression="ConditionalExpression",n.ContinueStatement="ContinueStatement",n.DebuggerStatement="DebuggerStatement",n.Decorator="Decorator",n.DoWhileStatement="DoWhileStatement",n.EmptyStatement="EmptyStatement",n.ExportAllDeclaration="ExportAllDeclaration",n.ExportDefaultDeclaration="ExportDefaultDeclaration",n.ExportNamedDeclaration="ExportNamedDeclaration",n.ExportSpecifier="ExportSpecifier",n.ExpressionStatement="ExpressionStatement",n.ForInStatement="ForInStatement",n.ForOfStatement="ForOfStatement",n.ForStatement="ForStatement",n.FunctionDeclaration="FunctionDeclaration",n.FunctionExpression="FunctionExpression",n.Identifier="Identifier",n.IfStatement="IfStatement",n.ImportDeclaration="ImportDeclaration",n.ImportDefaultSpecifier="ImportDefaultSpecifier",n.ImportExpression="ImportExpression",n.ImportNamespaceSpecifier="ImportNamespaceSpecifier",n.ImportSpecifier="ImportSpecifier",n.JSXAttribute="JSXAttribute",n.JSXClosingElement="JSXClosingElement",n.JSXClosingFragment="JSXClosingFragment",n.JSXElement="JSXElement",n.JSXEmptyExpression="JSXEmptyExpression",n.JSXExpressionContainer="JSXExpressionContainer",n.JSXFragment="JSXFragment",n.JSXIdentifier="JSXIdentifier",n.JSXMemberExpression="JSXMemberExpression",n.JSXNamespacedName="JSXNamespacedName",n.JSXOpeningElement="JSXOpeningElement",n.JSXOpeningFragment="JSXOpeningFragment",n.JSXSpreadAttribute="JSXSpreadAttribute",n.JSXSpreadChild="JSXSpreadChild",n.JSXText="JSXText",n.LabeledStatement="LabeledStatement",n.Literal="Literal",n.LogicalExpression="LogicalExpression",n.MemberExpression="MemberExpression",n.MetaProperty="MetaProperty",n.MethodDefinition="MethodDefinition",n.NewExpression="NewExpression",n.ObjectExpression="ObjectExpression",n.ObjectPattern="ObjectPattern",n.Program="Program",n.Property="Property",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.Super="Super",n.SwitchCase="SwitchCase",n.SwitchStatement="SwitchStatement",n.TaggedTemplateExpression="TaggedTemplateExpression",n.TemplateElement="TemplateElement",n.TemplateLiteral="TemplateLiteral",n.ThisExpression="ThisExpression",n.ThrowStatement="ThrowStatement",n.TryStatement="TryStatement",n.UnaryExpression="UnaryExpression",n.UpdateExpression="UpdateExpression",n.VariableDeclaration="VariableDeclaration",n.VariableDeclarator="VariableDeclarator",n.WhileStatement="WhileStatement",n.WithStatement="WithStatement",n.YieldExpression="YieldExpression",n.TSAbstractClassProperty="TSAbstractClassProperty",n.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAnyKeyword="TSAnyKeyword",n.TSArrayType="TSArrayType",n.TSAsExpression="TSAsExpression",n.TSAsyncKeyword="TSAsyncKeyword",n.TSBigIntKeyword="TSBigIntKeyword",n.TSBooleanKeyword="TSBooleanKeyword",n.TSCallSignatureDeclaration="TSCallSignatureDeclaration",n.TSClassImplements="TSClassImplements",n.TSConditionalType="TSConditionalType",n.TSConstructorType="TSConstructorType",n.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",n.TSDeclareFunction="TSDeclareFunction",n.TSDeclareKeyword="TSDeclareKeyword",n.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",n.TSEnumDeclaration="TSEnumDeclaration",n.TSEnumMember="TSEnumMember",n.TSExportAssignment="TSExportAssignment",n.TSExportKeyword="TSExportKeyword",n.TSExternalModuleReference="TSExternalModuleReference",n.TSFunctionType="TSFunctionType",n.TSImportEqualsDeclaration="TSImportEqualsDeclaration",n.TSImportType="TSImportType",n.TSIndexedAccessType="TSIndexedAccessType",n.TSIndexSignature="TSIndexSignature",n.TSInferType="TSInferType",n.TSInterfaceBody="TSInterfaceBody",n.TSInterfaceDeclaration="TSInterfaceDeclaration",n.TSInterfaceHeritage="TSInterfaceHeritage",n.TSIntersectionType="TSIntersectionType",n.TSIntrinsicKeyword="TSIntrinsicKeyword",n.TSLiteralType="TSLiteralType",n.TSMappedType="TSMappedType",n.TSMethodSignature="TSMethodSignature",n.TSModuleBlock="TSModuleBlock",n.TSModuleDeclaration="TSModuleDeclaration",n.TSNamedTupleMember="TSNamedTupleMember",n.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",n.TSNeverKeyword="TSNeverKeyword",n.TSNonNullExpression="TSNonNullExpression",n.TSNullKeyword="TSNullKeyword",n.TSNumberKeyword="TSNumberKeyword",n.TSObjectKeyword="TSObjectKeyword",n.TSOptionalType="TSOptionalType",n.TSParameterProperty="TSParameterProperty",n.TSParenthesizedType="TSParenthesizedType",n.TSPrivateKeyword="TSPrivateKeyword",n.TSPropertySignature="TSPropertySignature",n.TSProtectedKeyword="TSProtectedKeyword",n.TSPublicKeyword="TSPublicKeyword",n.TSQualifiedName="TSQualifiedName",n.TSReadonlyKeyword="TSReadonlyKeyword",n.TSRestType="TSRestType",n.TSStaticKeyword="TSStaticKeyword",n.TSStringKeyword="TSStringKeyword",n.TSSymbolKeyword="TSSymbolKeyword",n.TSTemplateLiteralType="TSTemplateLiteralType",n.TSThisType="TSThisType",n.TSTupleType="TSTupleType",n.TSTypeAliasDeclaration="TSTypeAliasDeclaration",n.TSTypeAnnotation="TSTypeAnnotation",n.TSTypeAssertion="TSTypeAssertion",n.TSTypeLiteral="TSTypeLiteral",n.TSTypeOperator="TSTypeOperator",n.TSTypeParameter="TSTypeParameter",n.TSTypeParameterDeclaration="TSTypeParameterDeclaration",n.TSTypeParameterInstantiation="TSTypeParameterInstantiation",n.TSTypePredicate="TSTypePredicate",n.TSTypeQuery="TSTypeQuery",n.TSTypeReference="TSTypeReference",n.TSUndefinedKeyword="TSUndefinedKeyword",n.TSUnionType="TSUnionType",n.TSUnknownKeyword="TSUnknownKeyword",n.TSVoidKeyword="TSVoidKeyword",(r=t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={})).Boolean="Boolean",r.Identifier="Identifier",r.JSXIdentifier="JSXIdentifier",r.JSXText="JSXText",r.Keyword="Keyword",r.Null="Null",r.Numeric="Numeric",r.Punctuator="Punctuator",r.RegularExpression="RegularExpression",r.String="String",r.Template="Template",r.Block="Block",r.Line="Line"});Object.defineProperty(exports,"__esModule",{value:!0});var x={__proto__:null};Object.defineProperty(exports,"__esModule",{value:!0});var C={__proto__:null},h=b(function(e,t){var n=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=void 0,t.TSESTree=a(E)}),F=b(function(e,t){var n=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=T&&T.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,Object.defineProperty(t,"AST_NODE_TYPES",{enumerable:!0,get:function(){return E.AST_NODE_TYPES}});var a=E;Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return a.AST_TOKEN_TYPES}}),r(x,t),r(C,t),r(h,t)});function B({parent:e},t){for(;e&&e.type!==F.AST_NODE_TYPES.Program;){if(t(e))return e;e=e.parent}return null}function v(e){if(B(e,I)||function(e){const t=g(e,"style");if("string"!=typeof t)return!1;const n=t.replace(/[\s'"]/g,"");return n.includes("display:none")||n.includes("visibility:hidden")}(e)||function(e){const t=g(e,"ngStyle");return t instanceof Map&&("none"===t.get("display")||"hidden"===t.get("visibility"))}(e)||function(e){return"none"===g(e,"style.display")||"true"===String(g(e,"style.display.none"))||"hidden"===g(e,"style.visibility")||"true"===String(g(e,"style.visibility.hidden"))}(e)||D(e,"aria-hidden")||D(e,"hidden"))return!0;if("INPUT"!==e.name.toUpperCase())return!1;const t=g(e,"type");return"string"==typeof t&&"HIDDEN"===t.toUpperCase()}function D(e,t){const n=g(e,t);return""===n||"true"===String(n)}function I(e){return e instanceof n.TmplAstElement&&v(e)}const w=new Set(["aria-label","innerHtml","innerHTML","innerText","outerHTML","title"]);var P=i({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}> should have content"}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"(n){if(v(n))return;const{attributes:r,inputs:a,name:o,sourceSpan:s}=n;if([...r,...a].map(({name:e})=>e).some(e=>w.has(e)))return;const u=t.convertNodeSourceSpanToLoc(s);e.report({loc:u,messageId:"accessibilityElementsContent",data:{element:o}})}}}});function N(){return(N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function O(e,t){return function e({children:r}){return r.some(r=>r instanceof n.TmplAstElement&&(r.name===t||e(r)))}(e)}const k={items:{type:"string"},type:"array",uniqueItems:!0},L=["button","input","meter","output","progress","select","textarea"],_=["for","htmlFor"],K=["label"];var R=i({name:"accessibility-label-for",meta:{deprecated:!0,replacedBy:["accessibility-label-has-associated-control"],type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:N({},k),labelAttributes:N({},k),labelComponents:N({},k)},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:L,labelAttributes:_,labelComponents:K}],create(e,[t]){const n=l(e),{controlComponents:r,labelAttributes:a,labelComponents:o}=function({controlComponents:e,labelAttributes:t,labelComponents:n}){return{controlComponents:new Set([...L,...null!=e?e:[]]),labelAttributes:new Set([..._,...null!=t?t:[]]),labelComponents:new Set([...K,...null!=n?n:[]])}}(t);var s;return{[`Element[name=${s=[...o],RegExp(`^(${s.join("|")})$`)}]`](t){const o=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if([...a].some(e=>o.has(e))||function(e,t){return Boolean([...e].some(e=>O(t,e)))}(r,t))return;const s=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:s,messageId:"accessibilityLabelFor"})}}}});const $="accessibility-label-has-associated-control",j=["input","meter","output","progress","select","textarea"],M=[{inputs:["for","htmlFor"],selector:"label"}];var q=i({name:$,meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:{items:{type:"string"},type:"array",uniqueItems:!0},labelComponents:{items:{additionalProperties:!1,properties:{inputs:{items:{type:"string"},type:"array",uniqueItems:!0},selector:{type:"string"}},required:["selector"],type:"object"},type:"array",uniqueItems:!0}},type:"object"}],messages:{accessibilityLabelHasAssociatedControl:"A label component must be associated with a form element"}},defaultOptions:[{controlComponents:j,labelComponents:M}],create(e,[{controlComponents:t,labelComponents:n}]){const r=l(e),a=new Set([...j,...null!=t?t:[]]),o=[...M,...null!=n?n:[]],s=o.map(({selector:e})=>e);return{[`Element[name=${RegExp(`^(${s.join("|")})$`)}]`](t){var n;const s=o.find(({selector:e})=>e===t.name);if(!s)return;const u=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if((null==(n=s.inputs)?void 0:n.some(e=>u.has(e)))||function(e,t){return Boolean([...e].some(e=>O(t,e)))}(a,t))return;const i=r.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:i,messageId:"accessibilityLabelHasAssociatedControl"})}}}});let X=null;function J(){var e;return null!=(e=X)?e:X=new Set(r.dom.keys())}function U(e){return RegExp(`^(${e.join("|")})$`)}var W=i({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that the `scope` attribute is only used on the `<th>` element",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{accessibilityTableScope:"The `scope` attribute should only be on the `<th>` element"}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()].filter(e=>"th"!==e))}] > :matches(BoundAttribute, TextAttribute)[name='scope']`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"accessibilityTableScope",fix:e=>e.removeRange([n.start.offset-1,n.end.offset])})}}}}),Y=i({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{accessibilityValidAria:"The `{{attribute}}` is an invalid ARIA attribute",accessibilityValidAriaValue:"The `{{attribute}}` has an invalid value. Check the valid values at https://raw.githack.com/w3c/aria/stable/#roles",suggestRemoveInvalidAria:"Remove attribute `{{attribute}}`"}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()])}] > :matches(BoundAttribute, TextAttribute)[name=/^aria-.+/]`](a){const{name:o,sourceSpan:s}=a,u=r.aria.get(o),i=t.convertNodeSourceSpanToLoc(s);if(!u)return void e.report({loc:i,messageId:"accessibilityValidAria",data:{attribute:o},suggest:[{messageId:"suggestRemoveInvalidAria",data:{attribute:o},fix:e=>e.removeRange([s.start.offset-1,s.end.offset])}]});const c=function(e){return e instanceof n.TmplAstBoundAttribute&&e.value instanceof n.ASTWithSource?e.value.ast:e}(a);(function(e){return!function(e){return e instanceof n.LiteralArray||e instanceof n.LiteralMap}(e)&&!function(e){return e instanceof n.LiteralPrimitive||e instanceof n.TmplAstTextAttribute}(e)})(c)||function({allowundefined:e,type:t,values:n},r){if(e&&H(r))return!0;switch(t){case"boolean":return V(r);case"tristate":return V(r)||H(r);case"id":case"idlist":return!0;case"integer":return a=r,!Number.isNaN(a)&&parseInt(Number(a))==a&&!Number.isNaN(parseInt(a,10));case"number":return function(e){return!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(e)}(r);case"string":return function(e){return"string"==typeof e}(r);case"token":case"tokenlist":{const e=V(r)?JSON.parse(r):r;return Boolean(null==n?void 0:n.includes(e))}}var a}(u,c.value)||e.report({loc:i,messageId:"accessibilityValidAriaValue",data:{attribute:o}})}}}});function V(e){return"boolean"==typeof e||"false"===e||"true"===e}function H(e){return null==e}const z=/\[(.*)\]/;var Q=i({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{bananaInBox:"Invalid binding syntax. Use [(expr)] instead"}},defaultOptions:[],create(e){const t=l(e),n=e.getSourceCode();return{BoundEvent({name:r,sourceSpan:a}){const o=r.match(z);if(!o)return;const s=t.convertNodeSourceSpanToLoc(a);e.report({messageId:"bananaInBox",loc:s,fix:e=>{const[,t]=o,a=`[(${t})]`,u=n.getIndexFromLoc(s.start);return e.replaceTextRange([u,u+r.length+2],a)}})}}}});let G=null,Z=null,ee=null;const te=new Set(["none","presentation"]);var ne=i({name:"click-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.",category:"Best Practices",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element(t){if(!J().has(t.name))return;if(function(e){const t=g(e,"role");return"string"==typeof t&&te.has(t)}(t)||v(t)||function(e){return J().has(e.name)&&function(e){function t({attributes:t,name:n}){return e.name===n&&function(e,t){const n=[...t.attributes,...t.inputs];return e.every(e=>n.some(({name:n})=>"a"===t.name&&"routerLink"===n||e.name===n&&(!e.value||e.value===g(t,e.name))))}(null!=t?t:[],e)}return!!function(){if(null===Z){const e=[...r.roles.keys()],t=[...r.elementRoles],n=new Set(e.filter(e=>{const t=r.roles.get(e);return t&&!t.abstract&&"progressbar"!==e&&t.superClass.some(e=>e.includes("widget"))}).concat("toolbar"));Z=t.reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return Z}().some(t)||!function(){if(null===ee){const e=[...r.roles.keys()],t=[...r.elementRoles],n=new Set(e.filter(e=>{const t=r.roles.get(e);return t&&!t.abstract&&"toolbar"!==e&&!t.superClass.some(e=>e.includes("widget"))}).concat("progressbar"));ee=t.reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return ee}().some(t)&&function(){if(null===G){const{AXObjects:e,elementAXObjects:t}=require("axobject-query"),n=new Set(Array.from(e.keys()).filter(t=>"widget"===e.get(t).type));G=[...t].reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return G}().some(t)}(e)}(t))return;let n=!1,a=!1;for(const e of t.outputs)n="click"===e.name,a=e.name.startsWith("keyup")||e.name.startsWith("keydown")||e.name.startsWith("keypress");if(!n||a)return;const o=l(e).convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:o,messageId:"clickEventsHaveKeyEvents"})}})}),re=i({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{"conditionalСomplexity":"The conditional complexity {{totalComplexity}} exceeds the defined limit {{maxComplexity}}"}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){p(e);const r=e.getSourceCode();return{BoundAttribute(a){if(!a.value.source)return;const o=se(ae((oe||(oe=new n.Parser(new n.Lexer))).parseBinding(a.value.source,"",0).ast));if(o<=t)return;const{sourceSpan:{start:s,end:u}}=a.value;e.report({loc:{start:r.getLocFromIndex(s),end:r.getLocFromIndex(u)},messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:o}})},Interpolation({expressions:n}){for(const a of n){const n=se(a);if(n<=t)continue;const{sourceSpan:{start:o,end:s}}=a;e.report({loc:{start:r.getLocFromIndex(o),end:r.getLocFromIndex(s)},messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:n}})}}}}});function ae(e){return e instanceof n.BindingPipe?e.exp:e}let oe=null;function se(e){const t=ae(e);if(!(t instanceof n.Binary||t instanceof n.Conditional))return 0;let r=1;return t instanceof n.Binary&&(t.left instanceof n.Binary&&(r+=se(t.left)),t.right instanceof n.Binary&&(r+=se(t.right))),t instanceof n.Conditional&&(r+=se(t.condition)+se(t.trueExp)+se(t.falseExp)),r}var ue=i({name:"cyclomatic-complexity",meta:{type:"suggestion",docs:{description:"Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{type:"number",minimum:1}},additionalProperties:!1}],messages:{cyclomaticComplexity:"The cyclomatic complexity {{totalComplexity}} exceeds the defined limit {{maxComplexity}}"}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){let n=0;const r=l(e);return{'BoundAttribute[name=/^(ngForOf|ngIf|ngSwitchCase)$/], TextAttribute[name="ngSwitchDefault"]'({sourceSpan:a}){if(n+=1,n<=t)return;const o=r.convertNodeSourceSpanToLoc(a);e.report({messageId:"cyclomaticComplexity",loc:o,data:{maxComplexity:t,totalComplexity:n}})}}}});const ie={allowNullOrUndefined:!1};var ce=i({name:"eqeqeq",meta:{type:"suggestion",docs:{description:"Requires `===` and `!==` in place of `==` and `!=`",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[{type:"object",properties:{allowNullOrUndefined:{type:"boolean",default:ie.allowNullOrUndefined}},additionalProperties:!1}],messages:{eqeqeq:"Expected `{{expectedOperation}}` but received `{{actualOperation}}`",suggestStrictEquality:"Replace `{{expectedOperation}}` with `{{actualOperation}}`"}},defaultOptions:[ie],create(e,[{allowNullOrUndefined:t}]){p(e);const n=e.getSourceCode();return{"Binary[operation=/^(==|!=)$/]"(r){const{left:a,operation:o,right:s,sourceSpan:{start:u,end:i}}=r;if(t&&(fe(a)||fe(s)))return;const c={actualOperation:o,expectedOperation:`${o}=`};e.report(N({loc:{start:n.getLocFromIndex(u),end:n.getLocFromIndex(i)},messageId:"eqeqeq",data:c},ge(a)||ge(s)?{fix:e=>pe({node:r,left:a,right:s,start:u,end:i,fixer:e})}:{suggest:[{messageId:"suggestStrictEquality",fix:e=>pe({node:r,left:a,right:s,start:u,end:i,fixer:e}),data:c}]}))}}}});function le({span:{start:e,end:t}}){return t-e}const pe=({node:e,left:t,right:n,start:r,end:a,fixer:o})=>{var s;const{source:u}=null!=(s=B(e,me))?s:{};return u?o.insertTextAfterRange([r+le(t)+1,a-le(n)-1],"="):null};function me(e){return e instanceof n.ASTWithSource}function de(e){return e instanceof n.LiteralPrimitive}function ge(e){return de(e)&&"string"==typeof e.value&&(t=e.value,!(!Number.isNaN(Number.parseFloat(String(t)))&&Number.isFinite(Number(t))));var t}function fe(e){return de(e)&&null==e.value}const ye=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Se=new RegExp(`[^${ye}]`),Ae=new Set(["charset","class","color","colspan","fill","formControlName","height","href","id","lang","ngClass","ngProjectAs","routerLink","src","stroke","stroke-width","style","svgIcon","tabindex","target","type","viewBox","width","xmlns"]),Te={checkAttributes:!0,checkId:!0,checkText:!0,ignoreAttributes:[...Ae]},be="https://angular.io/guide/i18n",Ee=`${be}#mark-element-attributes-for-translations`,xe=`${be}#mark-plurals-and-alternates-for-translation`,Ce=`${be}#mark-text-for-translations`,he=`${be}#manage-marked-text-with-custom-ids`,Fe=`${be}#define-unique-custom-ids`;var Be=i({name:"i18n",meta:{type:"suggestion",docs:{description:"Ensures following best practices for i18n. Checks for missing i18n attributes on elements and attributes containing texts. Can also check for texts without i18n attribute, elements that do not use custom ID (@@) feature and duplicate custom IDs",category:"Best Practices",recommended:!1,suggestion:!0},fixable:"code",schema:[{type:"object",properties:{boundTextAllowedPattern:{type:"string"},checkAttributes:{type:"boolean",default:Te.checkAttributes},checkId:{type:"boolean",default:Te.checkId},checkText:{type:"boolean",default:Te.checkText},ignoreAttributes:{type:"array",items:{type:"string"},default:[...Ae]},ignoreTags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{i18nAttribute:`Attribute "{{attributeName}}" has no corresponding i18n attribute. See more at ${Ee}`,i18nAttributeOnIcuOrText:`Each element containing text node should have an i18n attribute. See more at ${xe} and ${Ce}`,i18nCustomIdOnAttribute:`Missing custom ID on attribute "i18n-{{attributeName}}". See more at ${he}`,i18nCustomIdOnElement:`Missing custom ID on element. See more at ${he}`,i18nDuplicateCustomId:`Duplicate custom ID "@@{{customId}}". See more at ${Fe}`,suggestAddI18nAttribute:"Add the `i18n` attribute"}},defaultOptions:[Te],create(e,[{boundTextAllowedPattern:t,checkAttributes:r,checkId:a,checkText:o,ignoreAttributes:s,ignoreTags:u}]){const i=l(e),c=e.getSourceCode(),p=t?new RegExp(t):Se,m=new Set([...Ae,...null!=s?s:[]]),d=new Set(u),g=new Map;return N({},a&&{"Element[i18n]"(t){!function({i18n:{customId:t},name:n,parent:r,sourceSpan:a}){if(d.has(n)||De(r))return;if(!Ie(t)){var o;const e=null!=(o=g.get(t))?o:[];return void g.set(t,[...e,a])}const s=i.convertNodeSourceSpanToLoc(a);e.report({messageId:"i18nCustomIdOnElement",loc:s})}(t)}},(r||a)&&{[`Element > TextAttribute[value=${ye}]`](t){!function({i18n:t,keySpan:n,name:o,parent:{name:s},sourceSpan:u,value:l}){if(d.has(s))return;const p=i.convertNodeSourceSpanToLoc(null!=n?n:u);if(a&&t){const{customId:n}=t;if(Ie(n))e.report({messageId:"i18nCustomIdOnAttribute",loc:p,data:{attributeName:o}});else{var f;const e=null!=(f=g.get(n))?f:[];g.set(n,[...e,u])}}t||!r||function(e,t,n,r){return e.has(n)||e.has(`${t}[${n}]`)||Ie(r)||function(e){return"false"===e||"true"===e}(r)||function(e){const t=Number.parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}(r)}(m,s,o,l)||e.report({messageId:"i18nAttribute",loc:p,data:{attributeName:o},fix:e=>{const{end:t}=i.convertNodeSourceSpanToLoc(u),n=c.getIndexFromLoc(t);return e.insertTextAfterRange([n,n],` i18n-${o}`)}})}(t)}},o&&{[`BoundText, Icu, Text[value=${ye}]`](t){!function(t){var r;const{parent:a,sourceSpan:o}=t;if(t instanceof n.TmplAstBoundText&&function(e,{value:{ast:{strings:t}}}){const n=t.join("").trim();return!ye.test(n)||e.test(n)}(p,t)||ve(a)&&(a.i18n||d.has(a.name)))return;const s=i.convertNodeSourceSpanToLoc(o),u=e=>function(e,t,n,r,a){return ve(a)?B(a,De)?[]:function(e,t,{start:n},r){const a=e.getIndexFromLoc(n)+r.length+1;return t.insertTextAfterRange([a,a]," i18n")}(e,n,t.convertNodeSourceSpanToLoc(a.sourceSpan),a.name):function(e,t,{start:n,end:r}){const a=e.getIndexFromLoc(n),o=e.getIndexFromLoc(r);return[t.insertTextBeforeRange([a,a],"<ng-container i18n>"),t.insertTextAfterRange([o,o],"</ng-container>")]}(e,n,r)}(c,i,e,s,a);e.report(N({messageId:"i18nAttributeOnIcuOrText",loc:s},null!=a&&null!=(r=a.children)&&r.filter(ve).length?{suggest:[{messageId:"suggestAddI18nAttribute",fix:u}]}:{fix:u}))}(t)}},{"Program:exit"(){!function(){for(const[t,n]of g){if(n.length<=1)break;for(const r of n){const n=i.convertNodeSourceSpanToLoc(r);e.report({messageId:"i18nDuplicateCustomId",loc:n,data:{customId:t}})}}g.clear()}()}})}});function ve(e){return e instanceof n.TmplAstElement}function De(e){return Boolean(ve(e)&&e.i18n)}function Ie(e){return 0===e.trim().length}const we="https://www.w3.org/WAI/WCAG21/Understanding/keyboard";var Pe=i({name:"mouse-events-have-key-events",meta:{type:"suggestion",docs:{description:`Ensures that the mouse events \`mouseout\` and \`mouseover\` are accompanied by \`focus\` and \`blur\` events respectively. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screenreader users. See more at ${we}`,category:"Best Practices",recommended:!1},schema:[],messages:{mouseEventsHaveKeyEvents:`\`{{mouseEvent}}\` must be accompanied by \`{{keyEvent}}\` for accessibility (${we})`}},defaultOptions:[],create(e){const t=l(e),n=U([...J()]);return[["blur","mouseout"],["focus","mouseover"]].reduce((r,[a,o])=>N({},r,{[`Element[name=${n}]:has(BoundEvent[name='${o}']):not(:has(BoundEvent[name='${a}']))`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"mouseEventsHaveKeyEvents",data:{keyEvent:a,mouseEvent:o}})}}),{})}}),Ne=i({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of Angular\'s type system',category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{noAny:'Avoid using "$any" in templates',suggestRemoveAny:"Remove $any"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'MethodCall[name="$any"]:not([receiver.expression]):not([receiver.name])'({nameSpan:n,sourceSpan:{end:r,start:a}}){e.report({messageId:"noAny",loc:{start:t.getLocFromIndex(a),end:t.getLocFromIndex(r)},suggest:[{messageId:"suggestRemoveAny",fix:e=>[e.removeRange([n.start,n.end+1]),e.removeRange([r-1,r])]}]})}}}}),Oe=i({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensures that the `autofocus` attribute is not used",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{noAutofocus:"The `autofocus` attribute should not be used, as it reduces usability and accessibility for users"}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()])}] > :matches(BoundAttribute, TextAttribute)[name="autofocus"]`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"noAutofocus",fix:e=>e.removeRange([n.start.offset-1,n.end.offset])})}}}}),ke=i({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",category:"Best Practices",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'FunctionCall, MethodCall[name!="$any"], SafeMethodCall'(n){if(Boolean(B(n,Le)))return;const{sourceSpan:{start:r,end:a}}=n;e.report({loc:{start:t.getLocFromIndex(r),end:t.getLocFromIndex(a)},messageId:"noCallExpression"})}}}});function Le(e){return e instanceof n.TmplAstBoundEvent}var _e=i({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{noDistractingElements:"Do not use <{{element}}> elements as they can create visual accessibility issues and are deprecated"}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(blink|marquee)$/]"({name:n,sourceSpan:r}){const a=t.convertNodeSourceSpanToLoc(r);e.report({loc:a,messageId:"noDistractingElements",data:{element:n},fix:e=>e.removeRange([r.start.offset,r.end.offset])})}}}});const Ke={allowTwoWayDataBinding:!0};var Re=i({name:"no-duplicate-attributes",meta:{type:"problem",docs:{description:"Ensures that there are no duplicate input properties or output event listeners",category:"Possible Errors",recommended:!1,suggestion:!0},schema:[{type:"object",properties:{allowTwoWayDataBinding:{type:"boolean",default:Ke.allowTwoWayDataBinding,description:"Whether or not two-way data binding is allowed as an exception to the rule."}},additionalProperties:!1}],messages:{noDuplicateAttributes:"Duplicate attribute `{{attributeName}}`",suggestRemoveAttribute:"Remove attribute `{{attributeName}}`"}},defaultOptions:[Ke],create(e,[{allowTwoWayDataBinding:t}]){const n=l(e);return{Element({inputs:r,outputs:a,attributes:o}){[...$e([...r,...o]),...$e(t?a.filter(e=>!r.some(t=>t.sourceSpan.start===e.sourceSpan.start&&t.sourceSpan.end===e.sourceSpan.end)):a)].forEach(t=>{const r=n.convertNodeSourceSpanToLoc(t.sourceSpan),a={attributeName:d(t)};e.report({loc:r,messageId:"noDuplicateAttributes",data:a,suggest:[{messageId:"suggestRemoveAttribute",fix:e=>e.removeRange([r.start.column,r.end.column+1]),data:a}]})})}}}});function $e(e){return e.filter(t=>e.some(e=>e!==t&&d(e)===d(t)))}var je=i({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that async pipe results are not negated",category:"Best Practices",recommended:"error",suggestion:!0},schema:[],messages:{noNegatedAsync:"Async pipe results should not be negated. Use `(observable | async) === false`, `(observable | async) === null`, or `(observable | async) === undefined` to check its value instead",suggestFalseComparison:"Compare with `false`",suggestNullComparison:"Compare with `null`",suggestUndefinedComparison:"Compare with `undefined`"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{':not(PrefixNot) > PrefixNot > BindingPipe[name="async"]'({parent:{sourceSpan:{end:n,start:r}}}){e.report({messageId:"noNegatedAsync",loc:{start:t.getLocFromIndex(r),end:t.getLocFromIndex(n)},suggest:[{messageId:"suggestFalseComparison",textToInsert:" === false"},{messageId:"suggestNullComparison",textToInsert:" === null"},{messageId:"suggestUndefinedComparison",textToInsert:" === undefined"}].map(({messageId:e,textToInsert:t})=>({messageId:e,fix:e=>[e.removeRange([r,r+1]),e.insertTextAfterRange([n,n],t)]}))})}}}}),Me=i({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the `tabindex` attribute is not positive",category:"Best Practices",recommended:!1},schema:[],messages:{noPositiveTabindex:"The `tabindex` attribute should not be positive",suggestNonNegativeTabindex:'Use `tabindex="{{tabindex}}"`'}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()])}] > BoundAttribute[name="tabindex"][value.ast.value>0], TextAttribute[name="tabindex"][value>0]`]({valueSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"noPositiveTabindex",suggest:["-1","0"].map(e=>({messageId:"suggestNonNegativeTabindex",fix:t=>t.replaceTextRange([n.start.offset,n.end.offset],e),data:{tabindex:e}}))})}}}}),qe=i({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used",category:"Best Practices",recommended:!1},schema:[],messages:{useTrackByFunction:"Missing trackBy function in ngFor directive"}},defaultOptions:[],create(e){const t=l(e);return{'BoundAttribute.inputs[name="ngForOf"]'({parent:{inputs:n},sourceSpan:r}){if(n.some(Xe))return;const a=t.convertNodeSourceSpanToLoc(r);e.report({messageId:"useTrackByFunction",loc:a})},'BoundAttribute.templateAttrs[name="ngForOf"]'({parent:{templateAttrs:n}}){if(n.some(Xe))return;const{start:r}=t.convertNodeSourceSpanToLoc(n[0].sourceSpan),{end:a}=t.convertNodeSourceSpanToLoc(n[n.length-1].sourceSpan),o={start:N({},r,{column:r.column-1}),end:N({},a,{column:a.column+1})};e.report({messageId:"useTrackByFunction",loc:o})}}}});function Xe(e){return e instanceof n.TmplAstBoundAttribute&&"ngForTrackBy"===e.name}module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/template/accessibility-alt-text":"error","@angular-eslint/template/accessibility-elements-content":"error","@angular-eslint/template/accessibility-label-for":"error","@angular-eslint/template/accessibility-label-has-associated-control":"error","@angular-eslint/template/accessibility-table-scope":"error","@angular-eslint/template/accessibility-valid-aria":"error","@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/click-events-have-key-events":"error","@angular-eslint/template/conditional-complexity":"error","@angular-eslint/template/cyclomatic-complexity":"error","@angular-eslint/template/eqeqeq":"error","@angular-eslint/template/i18n":"error","@angular-eslint/template/mouse-events-have-key-events":"error","@angular-eslint/template/no-any":"error","@angular-eslint/template/no-autofocus":"error","@angular-eslint/template/no-call-expression":"error","@angular-eslint/template/no-distracting-elements":"error","@angular-eslint/template/no-duplicate-attributes":"error","@angular-eslint/template/no-negated-async":"error","@angular-eslint/template/no-positive-tabindex":"error","@angular-eslint/template/use-track-by-function":"error"}},base:{parser:"@angular-eslint/template-parser",plugins:["@angular-eslint/template"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/eqeqeq":"error","@angular-eslint/template/no-negated-async":"error"}},"process-inline-templates":{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module"},plugins:["@angular-eslint/template"],processor:"@angular-eslint/template/extract-inline-html"}},processors:u,rules:{"accessibility-alt-text":f,"accessibility-elements-content":P,"accessibility-label-for":R,[$]:q,"accessibility-table-scope":W,"accessibility-valid-aria":Y,"banana-in-box":Q,"conditional-complexity":re,"click-events-have-key-events":ne,"cyclomatic-complexity":ue,eqeqeq:ce,i18n:Be,"mouse-events-have-key-events":Pe,"no-any":Ne,"no-autofocus":Oe,"no-call-expression":ke,"no-distracting-elements":_e,"no-duplicate-attributes":Re,"no-negated-async":je,"no-positive-tabindex":Me,"use-track-by-function":qe}};
|
|
1
|
+
var e=require("typescript"),t=require("@typescript-eslint/experimental-utils/dist/eslint-utils"),n=require("@angular-eslint/bundled-angular-compiler"),r=require("aria-query");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(e);const s=new Map;var u={"extract-inline-html":{preprocess:function(e,t){const n=[e];if(!function(e,t){return!![".component.ts",".page.ts",".dialog.ts",".modal.ts",".popover.ts",".bottomsheet.ts",".snackbar.ts"].some(e=>t.endsWith(e))||!(!e.includes("Component")||!e.includes("@angular/core"))}(e,t))return n;try{const r=o.default.createSourceFile(t,e,o.default.ScriptTarget.Latest,!0),a=r.statements.filter(e=>o.default.isClassDeclaration(e));if(!a||!a.length)return n;const u=[];for(const e of a)if(e.decorators)for(const t of e.decorators)o.default.isCallExpression(t.expression)&&o.default.isIdentifier(t.expression.expression)&&"Component"===t.expression.expression.text&&u.push(t);if(!u||!u.length)return n;const i=[e];let c=0;for(const e of u){if(!o.default.isDecorator(e)||!o.default.isCallExpression(e.expression)||1!==e.expression.arguments.length)continue;const t=e.expression.arguments[0];if(!o.default.isObjectLiteralExpression(t))continue;const n=t.properties.find(e=>e&&e.name&&"template"===e.name.getText());if(t.properties.find(e=>e&&e.name&&"templateUrl"===e.name.getText())||!n)continue;if(!o.default.isPropertyAssignment(n))continue;let a;const u=n.initializer;if(o.default.isNoSubstitutionTemplateLiteral(u)&&(a=u.rawText),o.default.isTemplateExpression(u)&&(a=u.getText()),o.default.isStringLiteral(u)&&(a=u.text),!a)continue;const l=`inline-template-${++c}.component.html`,p=n.initializer.getStart(),m=n.initializer.getEnd();s.set(l,{range:[p,m],lineAndCharacter:{start:r.getLineAndCharacterOfPosition(p),end:r.getLineAndCharacterOfPosition(m)}}),i.push({text:a,filename:l})}return i}catch(e){return console.log(e),console.error("preprocess: ERROR could not parse @Component() metadata",t),n}},postprocess:function(e,t){const n=e[0];if(1===e.length)return n;const r=e.slice(1);return[...n,...[].concat(...r.map((e,t)=>{const n=`inline-template-${++t}.component.html`,r=s.get(n);return r?e.map(e=>{if(e.line=e.line+r.lineAndCharacter.start.line,e.endLine=e.endLine+r.lineAndCharacter.start.line,e.fix){const t=r.range[0];e.fix.range=[t+e.fix.range[0],t+e.fix.range[1]]}return e}):[]}))]},supportsAutofix:!0}};const i=(c=e=>`https://github.com/angular-eslint/angular-eslint/blob/master/packages/eslint-plugin/docs/rules/${e}.md`,function({name:e,meta:n,defaultOptions:r,create:a}){return{meta:Object.assign(Object.assign({},n),{docs:Object.assign(Object.assign({},n.docs),{url:c(e)})}),defaultOptions:r,create(e){const n=t.applyDefault(r,e.options);return a(e,n)}}});var c;function l(e){return p(e),e.parserServices}function p(e){var t,n;if(null==(t=e.parserServices)||!t.convertNodeSourceSpanToLoc||null==(n=e.parserServices)||!n.convertElementSourceSpanToLoc)throw new Error("You have used a rule which requires '@angular-eslint/template-parser' to be used as the 'parser' in your ESLint config.")}const m=Symbol("PROPERTY_READ");function d(e){var t;const{details:r}=null!=(t=e.keySpan)?t:{};return r?e instanceof n.TmplAstBoundEvent?function({keySpan:{details:e},name:t}){return t===`${e}Change`}(e)?e.name:r:r.replace("attr.",""):e.name}function g({attributes:e,inputs:t},r){const a=[...e,...t].find(e=>d(e)===r);if("string"==typeof(null==a?void 0:a.value))return a.value;if(!((null==a?void 0:a.value)instanceof n.ASTWithSource))return null;if(a.value.ast instanceof n.LiteralArray)return a.value.ast.expressions;if(a.value.ast instanceof n.LiteralMap){const{keys:e,values:t}=a.value.ast;return e.reduce((e,n,r)=>e.set(n.key,t[r]),new Map)}return a.value.ast instanceof n.LiteralPrimitive?a.value.ast.value:m}var f=i({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(img|area|object|input)$/]"(n){if(!function(e){return"img"===e.name?function(e){return e.attributes.some(({name:e})=>A(e))||e.inputs.some(({name:e})=>A(e))}(e):"object"===e.name?function(e){let t=!1,n=!1;for(const r of e.attributes)t="title"===r.name,n=S(r.name);if(t||n)return!0;let r=!1,a=!1;for(const t of e.inputs)r="title"===t.name,a=S(t.name);return!(!r&&!a)||e.children.length>0&&!!e.children[0].value}(e):"area"===e.name?y(e):function(e){return"image"!==g(e,"type")||y(e)}(e)}(n)){const r=t.convertElementSourceSpanToLoc(e,n);e.report({loc:r,messageId:"accessibilityAltText",data:{element:n.name}})}}}}});function y(e){let t=!1,n=!1;for(const r of e.attributes)t=A(r.name),n=S(r.name);if(t||n)return!0;let r=!1,a=!1;for(const t of e.inputs)r=A(t.name),a=S(t.name);return r||a}function S(e){return"aria-label"===e||"aria-labelledby"===e}function A(e){return"alt"===e}var T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e){var t={exports:{}};return e(t,t.exports),t.exports}var E=b(function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,(n=t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})).ArrayExpression="ArrayExpression",n.ArrayPattern="ArrayPattern",n.ArrowFunctionExpression="ArrowFunctionExpression",n.AssignmentExpression="AssignmentExpression",n.AssignmentPattern="AssignmentPattern",n.AwaitExpression="AwaitExpression",n.BinaryExpression="BinaryExpression",n.BlockStatement="BlockStatement",n.BreakStatement="BreakStatement",n.CallExpression="CallExpression",n.CatchClause="CatchClause",n.ChainExpression="ChainExpression",n.ClassBody="ClassBody",n.ClassDeclaration="ClassDeclaration",n.ClassExpression="ClassExpression",n.ClassProperty="ClassProperty",n.ConditionalExpression="ConditionalExpression",n.ContinueStatement="ContinueStatement",n.DebuggerStatement="DebuggerStatement",n.Decorator="Decorator",n.DoWhileStatement="DoWhileStatement",n.EmptyStatement="EmptyStatement",n.ExportAllDeclaration="ExportAllDeclaration",n.ExportDefaultDeclaration="ExportDefaultDeclaration",n.ExportNamedDeclaration="ExportNamedDeclaration",n.ExportSpecifier="ExportSpecifier",n.ExpressionStatement="ExpressionStatement",n.ForInStatement="ForInStatement",n.ForOfStatement="ForOfStatement",n.ForStatement="ForStatement",n.FunctionDeclaration="FunctionDeclaration",n.FunctionExpression="FunctionExpression",n.Identifier="Identifier",n.IfStatement="IfStatement",n.ImportDeclaration="ImportDeclaration",n.ImportDefaultSpecifier="ImportDefaultSpecifier",n.ImportExpression="ImportExpression",n.ImportNamespaceSpecifier="ImportNamespaceSpecifier",n.ImportSpecifier="ImportSpecifier",n.JSXAttribute="JSXAttribute",n.JSXClosingElement="JSXClosingElement",n.JSXClosingFragment="JSXClosingFragment",n.JSXElement="JSXElement",n.JSXEmptyExpression="JSXEmptyExpression",n.JSXExpressionContainer="JSXExpressionContainer",n.JSXFragment="JSXFragment",n.JSXIdentifier="JSXIdentifier",n.JSXMemberExpression="JSXMemberExpression",n.JSXNamespacedName="JSXNamespacedName",n.JSXOpeningElement="JSXOpeningElement",n.JSXOpeningFragment="JSXOpeningFragment",n.JSXSpreadAttribute="JSXSpreadAttribute",n.JSXSpreadChild="JSXSpreadChild",n.JSXText="JSXText",n.LabeledStatement="LabeledStatement",n.Literal="Literal",n.LogicalExpression="LogicalExpression",n.MemberExpression="MemberExpression",n.MetaProperty="MetaProperty",n.MethodDefinition="MethodDefinition",n.NewExpression="NewExpression",n.ObjectExpression="ObjectExpression",n.ObjectPattern="ObjectPattern",n.Program="Program",n.Property="Property",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.Super="Super",n.SwitchCase="SwitchCase",n.SwitchStatement="SwitchStatement",n.TaggedTemplateExpression="TaggedTemplateExpression",n.TemplateElement="TemplateElement",n.TemplateLiteral="TemplateLiteral",n.ThisExpression="ThisExpression",n.ThrowStatement="ThrowStatement",n.TryStatement="TryStatement",n.UnaryExpression="UnaryExpression",n.UpdateExpression="UpdateExpression",n.VariableDeclaration="VariableDeclaration",n.VariableDeclarator="VariableDeclarator",n.WhileStatement="WhileStatement",n.WithStatement="WithStatement",n.YieldExpression="YieldExpression",n.TSAbstractClassProperty="TSAbstractClassProperty",n.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAnyKeyword="TSAnyKeyword",n.TSArrayType="TSArrayType",n.TSAsExpression="TSAsExpression",n.TSAsyncKeyword="TSAsyncKeyword",n.TSBigIntKeyword="TSBigIntKeyword",n.TSBooleanKeyword="TSBooleanKeyword",n.TSCallSignatureDeclaration="TSCallSignatureDeclaration",n.TSClassImplements="TSClassImplements",n.TSConditionalType="TSConditionalType",n.TSConstructorType="TSConstructorType",n.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",n.TSDeclareFunction="TSDeclareFunction",n.TSDeclareKeyword="TSDeclareKeyword",n.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",n.TSEnumDeclaration="TSEnumDeclaration",n.TSEnumMember="TSEnumMember",n.TSExportAssignment="TSExportAssignment",n.TSExportKeyword="TSExportKeyword",n.TSExternalModuleReference="TSExternalModuleReference",n.TSFunctionType="TSFunctionType",n.TSImportEqualsDeclaration="TSImportEqualsDeclaration",n.TSImportType="TSImportType",n.TSIndexedAccessType="TSIndexedAccessType",n.TSIndexSignature="TSIndexSignature",n.TSInferType="TSInferType",n.TSInterfaceBody="TSInterfaceBody",n.TSInterfaceDeclaration="TSInterfaceDeclaration",n.TSInterfaceHeritage="TSInterfaceHeritage",n.TSIntersectionType="TSIntersectionType",n.TSIntrinsicKeyword="TSIntrinsicKeyword",n.TSLiteralType="TSLiteralType",n.TSMappedType="TSMappedType",n.TSMethodSignature="TSMethodSignature",n.TSModuleBlock="TSModuleBlock",n.TSModuleDeclaration="TSModuleDeclaration",n.TSNamedTupleMember="TSNamedTupleMember",n.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",n.TSNeverKeyword="TSNeverKeyword",n.TSNonNullExpression="TSNonNullExpression",n.TSNullKeyword="TSNullKeyword",n.TSNumberKeyword="TSNumberKeyword",n.TSObjectKeyword="TSObjectKeyword",n.TSOptionalType="TSOptionalType",n.TSParameterProperty="TSParameterProperty",n.TSParenthesizedType="TSParenthesizedType",n.TSPrivateKeyword="TSPrivateKeyword",n.TSPropertySignature="TSPropertySignature",n.TSProtectedKeyword="TSProtectedKeyword",n.TSPublicKeyword="TSPublicKeyword",n.TSQualifiedName="TSQualifiedName",n.TSReadonlyKeyword="TSReadonlyKeyword",n.TSRestType="TSRestType",n.TSStaticKeyword="TSStaticKeyword",n.TSStringKeyword="TSStringKeyword",n.TSSymbolKeyword="TSSymbolKeyword",n.TSTemplateLiteralType="TSTemplateLiteralType",n.TSThisType="TSThisType",n.TSTupleType="TSTupleType",n.TSTypeAliasDeclaration="TSTypeAliasDeclaration",n.TSTypeAnnotation="TSTypeAnnotation",n.TSTypeAssertion="TSTypeAssertion",n.TSTypeLiteral="TSTypeLiteral",n.TSTypeOperator="TSTypeOperator",n.TSTypeParameter="TSTypeParameter",n.TSTypeParameterDeclaration="TSTypeParameterDeclaration",n.TSTypeParameterInstantiation="TSTypeParameterInstantiation",n.TSTypePredicate="TSTypePredicate",n.TSTypeQuery="TSTypeQuery",n.TSTypeReference="TSTypeReference",n.TSUndefinedKeyword="TSUndefinedKeyword",n.TSUnionType="TSUnionType",n.TSUnknownKeyword="TSUnknownKeyword",n.TSVoidKeyword="TSVoidKeyword",(r=t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={})).Boolean="Boolean",r.Identifier="Identifier",r.JSXIdentifier="JSXIdentifier",r.JSXText="JSXText",r.Keyword="Keyword",r.Null="Null",r.Numeric="Numeric",r.Punctuator="Punctuator",r.RegularExpression="RegularExpression",r.String="String",r.Template="Template",r.Block="Block",r.Line="Line"});Object.defineProperty(exports,"__esModule",{value:!0});var x={__proto__:null};Object.defineProperty(exports,"__esModule",{value:!0});var C={__proto__:null},h=b(function(e,t){var n=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=void 0,t.TSESTree=a(E)}),F=b(function(e,t){var n=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=T&&T.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,Object.defineProperty(t,"AST_NODE_TYPES",{enumerable:!0,get:function(){return E.AST_NODE_TYPES}});var a=E;Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return a.AST_TOKEN_TYPES}}),r(x,t),r(C,t),r(h,t)});function B({parent:e},t){for(;e&&e.type!==F.AST_NODE_TYPES.Program;){if(t(e))return e;e=e.parent}return null}function v(e){if(B(e,I)||function(e){const t=g(e,"style");if("string"!=typeof t)return!1;const n=t.replace(/[\s'"]/g,"");return n.includes("display:none")||n.includes("visibility:hidden")}(e)||function(e){const t=g(e,"ngStyle");return t instanceof Map&&("none"===t.get("display")||"hidden"===t.get("visibility"))}(e)||function(e){return"none"===g(e,"style.display")||"true"===String(g(e,"style.display.none"))||"hidden"===g(e,"style.visibility")||"true"===String(g(e,"style.visibility.hidden"))}(e)||D(e,"aria-hidden")||D(e,"hidden"))return!0;if("INPUT"!==e.name.toUpperCase())return!1;const t=g(e,"type");return"string"==typeof t&&"HIDDEN"===t.toUpperCase()}function D(e,t){const n=g(e,t);return""===n||"true"===String(n)}function I(e){return e instanceof n.TmplAstElement&&v(e)}const w=new Set(["aria-label","innerHtml","innerHTML","innerText","outerHTML","title"]);var P=i({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}> should have content"}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"(n){if(v(n))return;const{attributes:r,inputs:a,name:o,sourceSpan:s}=n;if([...r,...a].map(({name:e})=>e).some(e=>w.has(e)))return;const u=t.convertNodeSourceSpanToLoc(s);e.report({loc:u,messageId:"accessibilityElementsContent",data:{element:o}})}}}});function N(){return(N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function O(e,t){return function e({children:r}){return r.some(r=>r instanceof n.TmplAstElement&&(r.name===t||e(r)))}(e)}const k={items:{type:"string"},type:"array",uniqueItems:!0},L=["button","input","meter","output","progress","select","textarea"],_=["for","htmlFor"],K=["label"];var R=i({name:"accessibility-label-for",meta:{deprecated:!0,replacedBy:["accessibility-label-has-associated-control"],type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:N({},k),labelAttributes:N({},k),labelComponents:N({},k)},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:L,labelAttributes:_,labelComponents:K}],create(e,[t]){const n=l(e),{controlComponents:r,labelAttributes:a,labelComponents:o}=function({controlComponents:e,labelAttributes:t,labelComponents:n}){return{controlComponents:new Set([...L,...null!=e?e:[]]),labelAttributes:new Set([..._,...null!=t?t:[]]),labelComponents:new Set([...K,...null!=n?n:[]])}}(t);var s;return{[`Element[name=${s=[...o],RegExp(`^(${s.join("|")})$`)}]`](t){const o=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if([...a].some(e=>o.has(e))||function(e,t){return Boolean([...e].some(e=>O(t,e)))}(r,t))return;const s=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:s,messageId:"accessibilityLabelFor"})}}}});const $="accessibility-label-has-associated-control",j=["input","meter","output","progress","select","textarea"],M=[{inputs:["for","htmlFor"],selector:"label"}];var q=i({name:$,meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:{items:{type:"string"},type:"array",uniqueItems:!0},labelComponents:{items:{additionalProperties:!1,properties:{inputs:{items:{type:"string"},type:"array",uniqueItems:!0},selector:{type:"string"}},required:["selector"],type:"object"},type:"array",uniqueItems:!0}},type:"object"}],messages:{accessibilityLabelHasAssociatedControl:"A label component must be associated with a form element"}},defaultOptions:[{controlComponents:j,labelComponents:M}],create(e,[{controlComponents:t,labelComponents:n}]){const r=l(e),a=new Set([...j,...null!=t?t:[]]),o=[...M,...null!=n?n:[]],s=o.map(({selector:e})=>e);return{[`Element[name=${RegExp(`^(${s.join("|")})$`)}]`](t){var n;const s=o.find(({selector:e})=>e===t.name);if(!s)return;const u=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if((null==(n=s.inputs)?void 0:n.some(e=>u.has(e)))||function(e,t){return Boolean([...e].some(e=>O(t,e)))}(a,t))return;const i=r.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:i,messageId:"accessibilityLabelHasAssociatedControl"})}}}});let X=null;function J(){var e;return null!=(e=X)?e:X=new Set(r.dom.keys())}function U(e){return RegExp(`^(${e.join("|")})$`)}var W=i({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that the `scope` attribute is only used on the `<th>` element",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{accessibilityTableScope:"The `scope` attribute should only be on the `<th>` element"}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()].filter(e=>"th"!==e))}] > :matches(BoundAttribute, TextAttribute)[name='scope']`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"accessibilityTableScope",fix:e=>e.removeRange([n.start.offset-1,n.end.offset])})}}}}),Y=i({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{accessibilityValidAria:"The `{{attribute}}` is an invalid ARIA attribute",accessibilityValidAriaValue:"The `{{attribute}}` has an invalid value. Check the valid values at https://raw.githack.com/w3c/aria/stable/#roles",suggestRemoveInvalidAria:"Remove attribute `{{attribute}}`"}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()])}] > :matches(BoundAttribute, TextAttribute)[name=/^aria-.+/]`](a){const{name:o,sourceSpan:s}=a,u=r.aria.get(o),i=t.convertNodeSourceSpanToLoc(s);if(!u)return void e.report({loc:i,messageId:"accessibilityValidAria",data:{attribute:o},suggest:[{messageId:"suggestRemoveInvalidAria",data:{attribute:o},fix:e=>e.removeRange([s.start.offset-1,s.end.offset])}]});const c=function(e){return e instanceof n.TmplAstBoundAttribute&&e.value instanceof n.ASTWithSource?e.value.ast:e}(a);(function(e){return!function(e){return e instanceof n.LiteralArray||e instanceof n.LiteralMap}(e)&&!function(e){return e instanceof n.LiteralPrimitive||e instanceof n.TmplAstTextAttribute}(e)})(c)||function({allowundefined:e,type:t,values:n},r){if(e&&H(r))return!0;switch(t){case"boolean":return V(r);case"tristate":return V(r)||H(r);case"id":case"idlist":return!0;case"integer":return a=r,!Number.isNaN(a)&&parseInt(Number(a))==a&&!Number.isNaN(parseInt(a,10));case"number":return function(e){return!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(e)}(r);case"string":return function(e){return"string"==typeof e}(r);case"token":case"tokenlist":{const e=V(r)?JSON.parse(r):r;return Boolean(null==n?void 0:n.includes(e))}}var a}(u,c.value)||e.report({loc:i,messageId:"accessibilityValidAriaValue",data:{attribute:o}})}}}});function V(e){return"boolean"==typeof e||"false"===e||"true"===e}function H(e){return null==e}const z=/\[(.*)\]/;var Q=i({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{bananaInBox:"Invalid binding syntax. Use [(expr)] instead"}},defaultOptions:[],create(e){const t=l(e),n=e.getSourceCode();return{BoundEvent({name:r,sourceSpan:a}){const o=r.match(z);if(!o)return;const s=t.convertNodeSourceSpanToLoc(a);e.report({messageId:"bananaInBox",loc:s,fix:e=>{const[,t]=o,a=`[(${t})]`,u=n.getIndexFromLoc(s.start);return e.replaceTextRange([u,u+r.length+2],a)}})}}}});let G=null,Z=null,ee=null;const te=new Set(["none","presentation"]);var ne=i({name:"click-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.",category:"Best Practices",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element(t){if(!J().has(t.name))return;if(function(e){const t=g(e,"role");return"string"==typeof t&&te.has(t)}(t)||v(t)||function(e){return J().has(e.name)&&function(e){function t({attributes:t,name:n}){return e.name===n&&function(e,t){const n=[...t.attributes,...t.inputs];return e.every(e=>n.some(({name:n})=>"a"===t.name&&"routerLink"===n||e.name===n&&(!e.value||e.value===g(t,e.name))))}(null!=t?t:[],e)}return!!function(){if(null===Z){const e=[...r.roles.keys()],t=[...r.elementRoles],n=new Set(e.filter(e=>{const t=r.roles.get(e);return t&&!t.abstract&&"progressbar"!==e&&t.superClass.some(e=>e.includes("widget"))}).concat("toolbar"));Z=t.reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return Z}().some(t)||!function(){if(null===ee){const e=[...r.roles.keys()],t=[...r.elementRoles],n=new Set(e.filter(e=>{const t=r.roles.get(e);return t&&!t.abstract&&"toolbar"!==e&&!t.superClass.some(e=>e.includes("widget"))}).concat("progressbar"));ee=t.reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return ee}().some(t)&&function(){if(null===G){const{AXObjects:e,elementAXObjects:t}=require("axobject-query"),n=new Set(Array.from(e.keys()).filter(t=>"widget"===e.get(t).type));G=[...t].reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return G}().some(t)}(e)}(t))return;let n=!1,a=!1;for(const e of t.outputs)n="click"===e.name,a=e.name.startsWith("keyup")||e.name.startsWith("keydown")||e.name.startsWith("keypress");if(!n||a)return;const o=l(e).convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:o,messageId:"clickEventsHaveKeyEvents"})}})}),re=i({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{"conditionalСomplexity":"The conditional complexity {{totalComplexity}} exceeds the defined limit {{maxComplexity}}"}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){p(e);const r=e.getSourceCode();return{BoundAttribute(a){if(!a.value.source)return;const o=se(ae((oe||(oe=new n.Parser(new n.Lexer))).parseBinding(a.value.source,"",0).ast));if(o<=t)return;const{sourceSpan:{start:s,end:u}}=a.value;e.report({loc:{start:r.getLocFromIndex(s),end:r.getLocFromIndex(u)},messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:o}})},Interpolation({expressions:n}){for(const a of n){const n=se(a);if(n<=t)continue;const{sourceSpan:{start:o,end:s}}=a;e.report({loc:{start:r.getLocFromIndex(o),end:r.getLocFromIndex(s)},messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:n}})}}}}});function ae(e){return e instanceof n.BindingPipe?e.exp:e}let oe=null;function se(e){const t=ae(e);if(!(t instanceof n.Binary||t instanceof n.Conditional))return 0;let r=1;return t instanceof n.Binary&&(t.left instanceof n.Binary&&(r+=se(t.left)),t.right instanceof n.Binary&&(r+=se(t.right))),t instanceof n.Conditional&&(r+=se(t.condition)+se(t.trueExp)+se(t.falseExp)),r}var ue=i({name:"cyclomatic-complexity",meta:{type:"suggestion",docs:{description:"Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{type:"number",minimum:1}},additionalProperties:!1}],messages:{cyclomaticComplexity:"The cyclomatic complexity {{totalComplexity}} exceeds the defined limit {{maxComplexity}}"}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){let n=0;const r=l(e);return{'BoundAttribute[name=/^(ngForOf|ngIf|ngSwitchCase)$/], TextAttribute[name="ngSwitchDefault"]'({sourceSpan:a}){if(n+=1,n<=t)return;const o=r.convertNodeSourceSpanToLoc(a);e.report({messageId:"cyclomaticComplexity",loc:o,data:{maxComplexity:t,totalComplexity:n}})}}}});const ie={allowNullOrUndefined:!1};var ce=i({name:"eqeqeq",meta:{type:"suggestion",docs:{description:"Requires `===` and `!==` in place of `==` and `!=`",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[{type:"object",properties:{allowNullOrUndefined:{type:"boolean",default:ie.allowNullOrUndefined}},additionalProperties:!1}],messages:{eqeqeq:"Expected `{{expectedOperation}}` but received `{{actualOperation}}`",suggestStrictEquality:"Replace `{{expectedOperation}}` with `{{actualOperation}}`"}},defaultOptions:[ie],create(e,[{allowNullOrUndefined:t}]){p(e);const n=e.getSourceCode();return{"Binary[operation=/^(==|!=)$/]"(r){const{left:a,operation:o,right:s,sourceSpan:{start:u,end:i}}=r;if(t&&(fe(a)||fe(s)))return;const c={actualOperation:o,expectedOperation:`${o}=`};e.report(N({loc:{start:n.getLocFromIndex(u),end:n.getLocFromIndex(i)},messageId:"eqeqeq",data:c},ge(a)||ge(s)?{fix:e=>pe({node:r,left:a,right:s,start:u,end:i,fixer:e})}:{suggest:[{messageId:"suggestStrictEquality",fix:e=>pe({node:r,left:a,right:s,start:u,end:i,fixer:e}),data:c}]}))}}}});function le({span:{start:e,end:t}}){return t-e}const pe=({node:e,left:t,right:n,start:r,end:a,fixer:o})=>{var s;const{source:u}=null!=(s=B(e,me))?s:{};return u?o.insertTextAfterRange([r+le(t)+1,a-le(n)-1],"="):null};function me(e){return e instanceof n.ASTWithSource}function de(e){return e instanceof n.LiteralPrimitive}function ge(e){return de(e)&&"string"==typeof e.value&&(t=e.value,!(!Number.isNaN(Number.parseFloat(String(t)))&&Number.isFinite(Number(t))));var t}function fe(e){return de(e)&&null==e.value}const ye=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Se=new RegExp(`[^${ye}]`),Ae=new Set(["charset","class","color","colspan","fill","formControlName","height","href","id","lang","ngClass","ngProjectAs","routerLink","src","stroke","stroke-width","style","svgIcon","tabindex","target","type","viewBox","width","xmlns"]),Te={checkAttributes:!0,checkId:!0,checkText:!0,ignoreAttributes:[...Ae]},be="https://angular.io/guide/i18n",Ee=`${be}#mark-element-attributes-for-translations`,xe=`${be}#mark-plurals-and-alternates-for-translation`,Ce=`${be}#mark-text-for-translations`,he=`${be}#manage-marked-text-with-custom-ids`,Fe=`${be}#define-unique-custom-ids`,Be=`${be}-common-prepare#i18n-metadata-for-translation`;var ve=i({name:"i18n",meta:{type:"suggestion",docs:{description:"Ensures following best practices for i18n. Checks for missing i18n attributes on elements and attributes containing texts. Can also check for texts without i18n attribute, elements that do not use custom ID (@@) feature and duplicate custom IDs",category:"Best Practices",recommended:!1,suggestion:!0},fixable:"code",schema:[{type:"object",properties:{boundTextAllowedPattern:{type:"string"},checkAttributes:{type:"boolean",default:Te.checkAttributes},checkId:{type:"boolean",default:Te.checkId},checkText:{type:"boolean",default:Te.checkText},ignoreAttributes:{type:"array",items:{type:"string"},default:[...Ae]},ignoreTags:{type:"array",items:{type:"string"}},requireDescription:{type:"boolean",default:Te.requireDescription}},additionalProperties:!1}],messages:{i18nAttribute:`Attribute "{{attributeName}}" has no corresponding i18n attribute. See more at ${Ee}`,i18nAttributeOnIcuOrText:`Each element containing text node should have an i18n attribute. See more at ${xe} and ${Ce}`,i18nCustomIdOnAttribute:`Missing custom ID on attribute "i18n-{{attributeName}}". See more at ${he}`,i18nCustomIdOnElement:`Missing custom ID on element. See more at ${he}`,i18nDuplicateCustomId:`Duplicate custom ID "@@{{customId}}". See more at ${Fe}`,suggestAddI18nAttribute:"Add the `i18n` attribute",i18nMissingDescription:`Missing i18n description on element. See more at ${Be}`}},defaultOptions:[Te],create(e,[{boundTextAllowedPattern:t,checkAttributes:r,checkId:a,checkText:o,ignoreAttributes:s,ignoreTags:u,requireDescription:i}]){const c=l(e),p=e.getSourceCode(),m=t?new RegExp(t):Se,d=new Set([...Ae,...null!=s?s:[]]),g=new Set(u),f=new Map;return N({},(a||i)&&{"Element[i18n]"(t){!function({i18n:{description:t,customId:n},name:r,parent:o,sourceSpan:s}){if(g.has(r)||Ie(o))return;const u=c.convertNodeSourceSpanToLoc(s);if(a)if(we(n))e.report({messageId:"i18nCustomIdOnElement",loc:u});else{var l;const e=null!=(l=f.get(n))?l:[];f.set(n,[...e,s])}i&&we(t)&&e.report({messageId:"i18nMissingDescription",loc:u})}(t)}},(r||a)&&{[`Element > TextAttribute[value=${ye}]`](t){!function({i18n:t,keySpan:n,name:o,parent:{name:s},sourceSpan:u,value:i}){if(g.has(s))return;const l=c.convertNodeSourceSpanToLoc(null!=n?n:u);if(a&&t){const{customId:n}=t;if(we(n))e.report({messageId:"i18nCustomIdOnAttribute",loc:l,data:{attributeName:o}});else{var m;const e=null!=(m=f.get(n))?m:[];f.set(n,[...e,u])}}t||!r||function(e,t,n,r){return e.has(n)||e.has(`${t}[${n}]`)||we(r)||function(e){return"false"===e||"true"===e}(r)||function(e){const t=Number.parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}(r)}(d,s,o,i)||e.report({messageId:"i18nAttribute",loc:l,data:{attributeName:o},fix:e=>{const{end:t}=c.convertNodeSourceSpanToLoc(u),n=p.getIndexFromLoc(t);return e.insertTextAfterRange([n,n],` i18n-${o}`)}})}(t)}},o&&{[`BoundText, Icu, Text[value=${ye}]`](t){!function(t){var r;const{parent:a,sourceSpan:o}=t;if(t instanceof n.TmplAstBoundText&&function(e,{value:{ast:{strings:t}}}){const n=t.join("").trim();return!ye.test(n)||e.test(n)}(m,t)||De(a)&&(a.i18n||g.has(a.name)))return;const s=c.convertNodeSourceSpanToLoc(o),u=e=>function(e,t,n,r,a){return De(a)?B(a,Ie)?[]:function(e,t,{start:n},r){const a=e.getIndexFromLoc(n)+r.length+1;return t.insertTextAfterRange([a,a]," i18n")}(e,n,t.convertNodeSourceSpanToLoc(a.sourceSpan),a.name):function(e,t,{start:n,end:r}){const a=e.getIndexFromLoc(n),o=e.getIndexFromLoc(r);return[t.insertTextBeforeRange([a,a],"<ng-container i18n>"),t.insertTextAfterRange([o,o],"</ng-container>")]}(e,n,r)}(p,c,e,s,a);e.report(N({messageId:"i18nAttributeOnIcuOrText",loc:s},null!=a&&null!=(r=a.children)&&r.filter(De).length?{suggest:[{messageId:"suggestAddI18nAttribute",fix:u}]}:{fix:u}))}(t)}},{"Program:exit"(){!function(){for(const[t,n]of f){if(n.length<=1)break;for(const r of n){const n=c.convertNodeSourceSpanToLoc(r);e.report({messageId:"i18nDuplicateCustomId",loc:n,data:{customId:t}})}}f.clear()}()}})}});function De(e){return e instanceof n.TmplAstElement}function Ie(e){return Boolean(De(e)&&e.i18n)}function we(e){return 0===e.trim().length}const Pe="https://www.w3.org/WAI/WCAG21/Understanding/keyboard";var Ne=i({name:"mouse-events-have-key-events",meta:{type:"suggestion",docs:{description:`Ensures that the mouse events \`mouseout\` and \`mouseover\` are accompanied by \`focus\` and \`blur\` events respectively. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screenreader users. See more at ${Pe}`,category:"Best Practices",recommended:!1},schema:[],messages:{mouseEventsHaveKeyEvents:`\`{{mouseEvent}}\` must be accompanied by \`{{keyEvent}}\` for accessibility (${Pe})`}},defaultOptions:[],create(e){const t=l(e),n=U([...J()]);return[["blur","mouseout"],["focus","mouseover"]].reduce((r,[a,o])=>N({},r,{[`Element[name=${n}]:has(BoundEvent[name='${o}']):not(:has(BoundEvent[name='${a}']))`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"mouseEventsHaveKeyEvents",data:{keyEvent:a,mouseEvent:o}})}}),{})}}),Oe=i({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of Angular\'s type system',category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{noAny:'Avoid using "$any" in templates',suggestRemoveAny:"Remove $any"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'MethodCall[name="$any"]:not([receiver.expression]):not([receiver.name])'({nameSpan:n,sourceSpan:{end:r,start:a}}){e.report({messageId:"noAny",loc:{start:t.getLocFromIndex(a),end:t.getLocFromIndex(r)},suggest:[{messageId:"suggestRemoveAny",fix:e=>[e.removeRange([n.start,n.end+1]),e.removeRange([r-1,r])]}]})}}}}),ke=i({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensures that the `autofocus` attribute is not used",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{noAutofocus:"The `autofocus` attribute should not be used, as it reduces usability and accessibility for users"}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()])}] > :matches(BoundAttribute, TextAttribute)[name="autofocus"]`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"noAutofocus",fix:e=>e.removeRange([n.start.offset-1,n.end.offset])})}}}}),Le=i({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",category:"Best Practices",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'FunctionCall, MethodCall[name!="$any"], SafeMethodCall'(n){if(Boolean(B(n,_e)))return;const{sourceSpan:{start:r,end:a}}=n;e.report({loc:{start:t.getLocFromIndex(r),end:t.getLocFromIndex(a)},messageId:"noCallExpression"})}}}});function _e(e){return e instanceof n.TmplAstBoundEvent}var Ke=i({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{noDistractingElements:"Do not use <{{element}}> elements as they can create visual accessibility issues and are deprecated"}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(blink|marquee)$/]"({name:n,sourceSpan:r}){const a=t.convertNodeSourceSpanToLoc(r);e.report({loc:a,messageId:"noDistractingElements",data:{element:n},fix:e=>e.removeRange([r.start.offset,r.end.offset])})}}}});const Re={allowTwoWayDataBinding:!0};var $e=i({name:"no-duplicate-attributes",meta:{type:"problem",docs:{description:"Ensures that there are no duplicate input properties or output event listeners",category:"Possible Errors",recommended:!1,suggestion:!0},schema:[{type:"object",properties:{allowTwoWayDataBinding:{type:"boolean",default:Re.allowTwoWayDataBinding,description:"Whether or not two-way data binding is allowed as an exception to the rule."}},additionalProperties:!1}],messages:{noDuplicateAttributes:"Duplicate attribute `{{attributeName}}`",suggestRemoveAttribute:"Remove attribute `{{attributeName}}`"}},defaultOptions:[Re],create(e,[{allowTwoWayDataBinding:t}]){const n=l(e);return{Element({inputs:r,outputs:a,attributes:o}){[...je([...r,...o]),...je(t?a.filter(e=>!r.some(t=>t.sourceSpan.start===e.sourceSpan.start&&t.sourceSpan.end===e.sourceSpan.end)):a)].forEach(t=>{const r=n.convertNodeSourceSpanToLoc(t.sourceSpan),a={attributeName:d(t)};e.report({loc:r,messageId:"noDuplicateAttributes",data:a,suggest:[{messageId:"suggestRemoveAttribute",fix:e=>e.removeRange([r.start.column,r.end.column+1]),data:a}]})})}}}});function je(e){return e.filter(t=>e.some(e=>e!==t&&d(e)===d(t)))}var Me=i({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that async pipe results are not negated",category:"Best Practices",recommended:"error",suggestion:!0},schema:[],messages:{noNegatedAsync:"Async pipe results should not be negated. Use `(observable | async) === false`, `(observable | async) === null`, or `(observable | async) === undefined` to check its value instead",suggestFalseComparison:"Compare with `false`",suggestNullComparison:"Compare with `null`",suggestUndefinedComparison:"Compare with `undefined`"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{':not(PrefixNot) > PrefixNot > BindingPipe[name="async"]'({parent:{sourceSpan:{end:n,start:r}}}){e.report({messageId:"noNegatedAsync",loc:{start:t.getLocFromIndex(r),end:t.getLocFromIndex(n)},suggest:[{messageId:"suggestFalseComparison",textToInsert:" === false"},{messageId:"suggestNullComparison",textToInsert:" === null"},{messageId:"suggestUndefinedComparison",textToInsert:" === undefined"}].map(({messageId:e,textToInsert:t})=>({messageId:e,fix:e=>[e.removeRange([r,r+1]),e.insertTextAfterRange([n,n],t)]}))})}}}}),qe=i({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the `tabindex` attribute is not positive",category:"Best Practices",recommended:!1},schema:[],messages:{noPositiveTabindex:"The `tabindex` attribute should not be positive",suggestNonNegativeTabindex:'Use `tabindex="{{tabindex}}"`'}},defaultOptions:[],create(e){const t=l(e);return{[`Element[name=${U([...J()])}] > BoundAttribute[name="tabindex"][value.ast.value>0], TextAttribute[name="tabindex"][value>0]`]({valueSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"noPositiveTabindex",suggest:["-1","0"].map(e=>({messageId:"suggestNonNegativeTabindex",fix:t=>t.replaceTextRange([n.start.offset,n.end.offset],e),data:{tabindex:e}}))})}}}}),Xe=i({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used",category:"Best Practices",recommended:!1},schema:[],messages:{useTrackByFunction:"Missing trackBy function in ngFor directive"}},defaultOptions:[],create(e){const t=l(e);return{'BoundAttribute.inputs[name="ngForOf"]'({parent:{inputs:n},sourceSpan:r}){if(n.some(Je))return;const a=t.convertNodeSourceSpanToLoc(r);e.report({messageId:"useTrackByFunction",loc:a})},'BoundAttribute.templateAttrs[name="ngForOf"]'({parent:{templateAttrs:n}}){if(n.some(Je))return;const{start:r}=t.convertNodeSourceSpanToLoc(n[0].sourceSpan),{end:a}=t.convertNodeSourceSpanToLoc(n[n.length-1].sourceSpan),o={start:N({},r,{column:r.column-1}),end:N({},a,{column:a.column+1})};e.report({messageId:"useTrackByFunction",loc:o})}}}});function Je(e){return e instanceof n.TmplAstBoundAttribute&&"ngForTrackBy"===e.name}module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/template/accessibility-alt-text":"error","@angular-eslint/template/accessibility-elements-content":"error","@angular-eslint/template/accessibility-label-for":"error","@angular-eslint/template/accessibility-label-has-associated-control":"error","@angular-eslint/template/accessibility-table-scope":"error","@angular-eslint/template/accessibility-valid-aria":"error","@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/click-events-have-key-events":"error","@angular-eslint/template/conditional-complexity":"error","@angular-eslint/template/cyclomatic-complexity":"error","@angular-eslint/template/eqeqeq":"error","@angular-eslint/template/i18n":"error","@angular-eslint/template/mouse-events-have-key-events":"error","@angular-eslint/template/no-any":"error","@angular-eslint/template/no-autofocus":"error","@angular-eslint/template/no-call-expression":"error","@angular-eslint/template/no-distracting-elements":"error","@angular-eslint/template/no-duplicate-attributes":"error","@angular-eslint/template/no-negated-async":"error","@angular-eslint/template/no-positive-tabindex":"error","@angular-eslint/template/use-track-by-function":"error"}},base:{parser:"@angular-eslint/template-parser",plugins:["@angular-eslint/template"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/eqeqeq":"error","@angular-eslint/template/no-negated-async":"error"}},"process-inline-templates":{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module"},plugins:["@angular-eslint/template"],processor:"@angular-eslint/template/extract-inline-html"}},processors:u,rules:{"accessibility-alt-text":f,"accessibility-elements-content":P,"accessibility-label-for":R,[$]:q,"accessibility-table-scope":W,"accessibility-valid-aria":Y,"banana-in-box":Q,"conditional-complexity":re,"click-events-have-key-events":ne,"cyclomatic-complexity":ue,eqeqeq:ce,i18n:ve,"mouse-events-have-key-events":Ne,"no-any":Oe,"no-autofocus":ke,"no-call-expression":Le,"no-distracting-elements":Ke,"no-duplicate-attributes":$e,"no-negated-async":Me,"no-positive-tabindex":qe,"use-track-by-function":Xe}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.0",
|
|
4
4
|
"description": "ESLint plugin for Angular Templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"LICENSE"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@angular-eslint/bundled-angular-compiler": "12.
|
|
20
|
+
"@angular-eslint/bundled-angular-compiler": "12.7.0",
|
|
21
21
|
"@typescript-eslint/experimental-utils": "4.28.2",
|
|
22
22
|
"aria-query": "^4.2.2",
|
|
23
23
|
"axobject-query": "^2.2.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@angular-eslint/utils": "12.
|
|
26
|
+
"@angular-eslint/utils": "12.7.0",
|
|
27
27
|
"@types/aria-query": "4.2.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"eslint": "*",
|
|
31
31
|
"typescript": "*"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "f1e7704b7c0f57d7743fef8cd7500bc3103b9b5b"
|
|
34
34
|
}
|