@angular-eslint/eslint-plugin-template 14.0.0-alpha.2 → 14.0.0-alpha.3
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AST,
|
|
2
|
-
declare type ASTOrNodeWithParent = (AST |
|
|
1
|
+
import type { AST, TmplAstNode } from '@angular-eslint/bundled-angular-compiler';
|
|
2
|
+
declare type ASTOrNodeWithParent = (AST | TmplAstNode) & {
|
|
3
3
|
parent?: ASTOrNodeWithParent;
|
|
4
4
|
};
|
|
5
5
|
export declare function getNearestNodeFrom<T extends ASTOrNodeWithParent>({ parent }: ASTOrNodeWithParent, predicate: (parent: ASTOrNodeWithParent) => parent is T): T | null;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("typescript"),t=require("@typescript-eslint/experimental-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=e=>function({name:n,meta:r,defaultOptions:a,create:o}){return{meta:Object.assign(Object.assign({},r),{docs:Object.assign(Object.assign({},r.docs),{url:e(n)})}),defaultOptions:a,create(e){const n=t.ESLintUtils.applyDefault(a,e.options);return o(e,n)}}};i.withoutDocs=t.ESLintUtils.RuleCreator.withoutDocs;const c=i(e=>`https://github.com/angular-eslint/angular-eslint/blob/master/packages/eslint-plugin-template/docs/rules/${e}.md`);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 f({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 g=c({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=l(e);return{"Element$1[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"!==f(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 b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function T(e){var t={exports:{}};return e(t,t.exports),t.exports}var E=T(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.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.ImportAttribute="ImportAttribute",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.PrivateIdentifier="PrivateIdentifier",n.Program="Program",n.Property="Property",n.PropertyDefinition="PropertyDefinition",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.StaticBlock="StaticBlock",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.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",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.TSInstantiationExpression="TSInstantiationExpression",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.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 h={__proto__:null},C=T(function(e,t){var n=b&&b.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=b&&b.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=b&&b.__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)}),v=T(function(e,t){var n=b&&b.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=b&&b.__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}}),Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return E.AST_TOKEN_TYPES}}),r(x,t),r(h,t),r(C,t)});function F({parent:e},t){for(;e&&e.type!==v.AST_NODE_TYPES.Program;){if(t(e))return e;e=e.parent}return null}function D(e){if(F(e,I)||function(e){const t=f(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=f(e,"ngStyle");return t instanceof Map&&("none"===t.get("display")||"hidden"===t.get("visibility"))}(e)||function(e){return"none"===f(e,"style.display")||"true"===String(f(e,"style.display.none"))||"hidden"===f(e,"style.visibility")||"true"===String(f(e,"style.visibility.hidden"))}(e)||B(e,"aria-hidden")||B(e,"hidden"))return!0;if("INPUT"!==e.name.toUpperCase())return!1;const t=f(e,"type");return"string"==typeof t&&"HIDDEN"===t.toUpperCase()}function B(e,t){const n=f(e,t);return""===n||"true"===String(n)}function I(e){return e instanceof n.TmplAstElement&&D(e)}const w=new Set(["aria-label","innerHtml","innerHTML","innerText","outerHTML","title"]);var N=c({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}> should have content"}},defaultOptions:[],create(e){const t=l(e);return{"Element$1[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"(n){if(D(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 O(){return(O=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 P(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"],_=["label"];var R=c({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",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:O({},k),labelAttributes:O({},k),labelComponents:O({},k)},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:L,labelAttributes:$,labelComponents:_}],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([..._,...null!=n?n:[]])}}(t);var s;return{[`Element$1[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=>P(t,e)))}(r,t))return;const s=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:s,messageId:"accessibilityLabelFor"})}}}});const K="accessibility-label-has-associated-control",j=["input","meter","output","progress","select","textarea"],M=[{inputs:["for","htmlFor"],selector:"label"}];var q=c({name:K,meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",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$1[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=>P(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=c({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that the `scope` attribute is only used on the `<th>` element",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$1[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=c({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",recommended:!1},hasSuggestions:!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$1[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=c({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",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=c({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.",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element$1(t){if(!J().has(t.name))return;if(function(e){const t=f(e,"role");return"string"==typeof t&&te.has(t)}(t)||D(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===f(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=c({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{conditionalComplexity:"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||a.value.ast instanceof n.Interpolation)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:"conditionalComplexity",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:"conditionalComplexity",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=c({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",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=c({name:"eqeqeq",meta:{type:"suggestion",docs:{description:"Requires `===` and `!==` in place of `==` and `!=`",recommended:"error"},hasSuggestions:!0,fixable:"code",schema:[{type:"object",properties:{allowNullOrUndefined:{type:"boolean",default:ie.allowNullOrUndefined}},additionalProperties:!1}],messages:{eqeqeq:"Expected `{{expectedOperation}}` but received `{{actualOperation}}`",suggestStrictEquality:"Replace `{{actualOperation}}` with `{{expectedOperation}}`"}},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&&(ge(a)||ge(s)))return;const c={actualOperation:o,expectedOperation:`${o}=`};e.report(O({loc:{start:n.getLocFromIndex(u),end:n.getLocFromIndex(i)},messageId:"eqeqeq",data:c},fe(a)||fe(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=F(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 fe(e){return de(e)&&"string"==typeof e.value&&(t=e.value,!(!Number.isNaN(Number.parseFloat(String(t)))&&Number.isFinite(Number(t))));var t}function ge(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"]),be={checkAttributes:!0,checkId:!0,checkDuplicateId:!0,checkText:!0,ignoreAttributes:[...Ae]},Te="https://angular.io/guide/i18n",Ee=`${Te}#mark-element-attributes-for-translations`,xe=`${Te}#mark-plurals-and-alternates-for-translation`,he=`${Te}#mark-text-for-translations`,Ce=`${Te}#manage-marked-text-with-custom-ids`,ve=`${Te}#define-unique-custom-ids`,Fe=`${Te}-common-prepare#i18n-metadata-for-translation`;var De=c({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",recommended:!1},fixable:"code",hasSuggestions:!0,schema:[{type:"object",properties:{boundTextAllowedPattern:{type:"string"},checkAttributes:{type:"boolean",default:be.checkAttributes},checkDuplicateId:{type:"boolean",default:be.checkDuplicateId},checkId:{type:"boolean",default:be.checkId},checkText:{type:"boolean",default:be.checkText},ignoreAttributes:{type:"array",items:{type:"string"},default:[...Ae]},ignoreTags:{type:"array",items:{type:"string"}},requireDescription:{type:"boolean",default:be.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 ${he}`,i18nCustomIdOnAttribute:`Missing custom ID on attribute "i18n-{{attributeName}}". See more at ${Ce}`,i18nCustomIdOnElement:`Missing custom ID on element. See more at ${Ce}`,i18nDuplicateCustomId:`Duplicate custom ID "@@{{customId}}". See more at ${ve}`,suggestAddI18nAttribute:"Add the `i18n` attribute",i18nMissingDescription:`Missing i18n description on element. See more at ${Fe}`}},defaultOptions:[be],create(e,[{boundTextAllowedPattern:t,checkAttributes:r,checkId:a,checkDuplicateId:o,checkText:s,ignoreAttributes:u,ignoreTags:i,requireDescription:c}]){const p=l(e),m=e.getSourceCode(),d=t?new RegExp(t):Se,f=new Set([...Ae,...null!=u?u:[]]),g=new Set(i),y=new Map;return O({},(a||c)&&{"Element$1[i18n]"(t){!function({i18n:{description:t,customId:n},name:r,parent:o,sourceSpan:s}){if(g.has(r)||Ie(o))return;const u=p.convertNodeSourceSpanToLoc(s);if(a)if(we(n))e.report({messageId:"i18nCustomIdOnElement",loc:u});else{var i;const e=null!=(i=y.get(n))?i:[];y.set(n,[...e,s])}c&&we(t)&&e.report({messageId:"i18nMissingDescription",loc:u})}(t)}},(r||a||c)&&{[`Element$1 > 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=p.convertNodeSourceSpanToLoc(null!=n?n:u);if(t){const{customId:n,description:r}=t;if(a)if(we(n))e.report({messageId:"i18nCustomIdOnAttribute",loc:l,data:{attributeName:o}});else{var d;const e=null!=(d=y.get(n))?d:[];y.set(n,[...e,u])}c&&we(r)&&e.report({messageId:"i18nMissingDescription",loc:l,data:{attributeName:o}})}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)}(f,s,o,i)||e.report({messageId:"i18nAttribute",loc:l,data:{attributeName:o},fix:e=>{const{end:t}=p.convertNodeSourceSpanToLoc(u),n=m.getIndexFromLoc(t);return e.insertTextAfterRange([n,n],` i18n-${o}`)}})}(t)}},s&&{[`BoundText, Icu$1, Text$3[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)}(d,t)||Be(a)&&(a.i18n||g.has(a.name)))return;const s=p.convertNodeSourceSpanToLoc(o),u=e=>function(e,t,n,r,a){return Be(a)?F(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)}(m,p,e,s,a);e.report(O({messageId:"i18nAttributeOnIcuOrText",loc:s},null!=a&&null!=(r=a.children)&&r.filter(Be).length?{suggest:[{messageId:"suggestAddI18nAttribute",fix:u}]}:{fix:u}))}(t)}},{"Program:exit"(){!function(){if(o)for(const[t,n]of y){if(n.length<=1)break;for(const r of n){const n=p.convertNodeSourceSpanToLoc(r);e.report({messageId:"i18nDuplicateCustomId",loc:n,data:{customId:t}})}}y.clear()}()}})}});function Be(e){return e instanceof n.TmplAstElement}function Ie(e){return Boolean(Be(e)&&e.i18n)}function we(e){return!e||0===e.trim().length}const Ne="https://www.w3.org/WAI/WCAG21/Understanding/keyboard";var Oe=c({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 ${Ne}`,recommended:!1},schema:[],messages:{mouseEventsHaveKeyEvents:`\`{{mouseEvent}}\` must be accompanied by \`{{keyEvent}}\` for accessibility (${Ne})`}},defaultOptions:[],create(e){const t=l(e),n=U([...J()]);return[["blur","mouseout"],["focus","mouseover"]].reduce((r,[a,o])=>O({},r,{[`Element$1[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}})}}),{})}}),Pe=c({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of Angular\'s type system',recommended:!1},hasSuggestions:!0,schema:[],messages:{noAny:'Avoid using "$any" in templates',suggestRemoveAny:"Remove $any"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'Call[receiver.name="$any"]'({receiver:r,sourceSpan:{end:a,start:o}}){if(!(r instanceof n.PropertyRead))return;if(!(r.receiver instanceof n.ThisReceiver||r.receiver instanceof n.ImplicitReceiver))return;const s=r.nameSpan;e.report({messageId:"noAny",loc:{start:t.getLocFromIndex(o),end:t.getLocFromIndex(a)},suggest:[{messageId:"suggestRemoveAny",fix:e=>[e.removeRange([s.start,s.end+1]),e.removeRange([a-1,a])]}]})}}}}),ke=c({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensures that the `autofocus` attribute is not used",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$1[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=c({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'Call[receiver.name!="$any"]'(n){if(Boolean(F(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 _e=c({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",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$1[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 Ke=c({name:"no-duplicate-attributes",meta:{type:"problem",docs:{description:"Ensures that there are no duplicate input properties or output event listeners",recommended:!1},hasSuggestions:!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$1({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=c({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that async pipe results are not negated",recommended:"error"},hasSuggestions:!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=c({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the `tabindex` attribute is not positive",recommended:!1},hasSuggestions:!0,schema:[],messages:{noPositiveTabindex:"The `tabindex` attribute should not be positive",suggestNonNegativeTabindex:'Use `tabindex="{{tabindex}}"`'}},defaultOptions:[],create(e){const t=l(e);return{[`Element$1[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=c({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used",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:O({},r,{column:r.column-1}),end:O({},a,{column:a.column+1})};e.report({messageId:"useTrackByFunction",loc:o})}}}});function Je(e){return e instanceof n.TmplAstBoundAttribute&&"ngForTrackBy"===e.name}const Ue=["button","submit","reset"];var We=c({name:"button-has-type",meta:{type:"suggestion",docs:{description:"Ensures that a button has a valid type specified",recommended:!1},schema:[],messages:{missingType:"Type for <button> is missing",invalidType:'"{{type}}" can not be used as a type for <button>'}},defaultOptions:[],create(e){const t=l(e);return{"Element$1[name=button]"(r){(function({inputs:e,attributes:t}){return[...e,...t].some(({name:e})=>"type"===e)})(r)||e.report({loc:t.convertNodeSourceSpanToLoc(r.sourceSpan),messageId:"missingType"});const a=function(e){const t=e.attributes.find(({name:e,value:t})=>"type"===e&&!Ue.includes(t));if(t)return{sourceSpan:t.sourceSpan,value:t.value};for(const{name:t,value:r,sourceSpan:a}of e.inputs)if("type"===t&&r instanceof n.ASTWithSource&&r.ast instanceof n.LiteralPrimitive&&!Ue.includes(r.ast.value))return{value:r.ast.value,sourceSpan:a};return null}(r);null!=a&&e.report({loc:t.convertNodeSourceSpanToLoc(a.sourceSpan),messageId:"invalidType",data:{type:a.value}})}}}});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","@angular-eslint/template/button-has-type":"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":g,"accessibility-elements-content":N,"accessibility-label-for":R,[K]: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:De,"mouse-events-have-key-events":Oe,"no-any":Pe,"no-autofocus":ke,"no-call-expression":Le,"no-distracting-elements":_e,"no-duplicate-attributes":Ke,"no-negated-async":Me,"no-positive-tabindex":qe,"use-track-by-function":Xe,"button-has-type":We}};
|
|
1
|
+
var e=require("typescript"),t=require("@typescript-eslint/experimental-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=e=>function({name:n,meta:r,defaultOptions:a,create:o}){return{meta:Object.assign(Object.assign({},r),{docs:Object.assign(Object.assign({},r.docs),{url:e(n)})}),defaultOptions:a,create(e){const n=t.ESLintUtils.applyDefault(a,e.options);return o(e,n)}}};i.withoutDocs=t.ESLintUtils.RuleCreator.withoutDocs;const c=i(e=>`https://github.com/angular-eslint/angular-eslint/blob/master/packages/eslint-plugin-template/docs/rules/${e}.md`);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 f({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 g=c({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=l(e);return{"Element$1[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"!==f(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 b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function T(e){var t={exports:{}};return e(t,t.exports),t.exports}var E=T(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.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.ImportAttribute="ImportAttribute",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.PrivateIdentifier="PrivateIdentifier",n.Program="Program",n.Property="Property",n.PropertyDefinition="PropertyDefinition",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.StaticBlock="StaticBlock",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.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",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.TSInstantiationExpression="TSInstantiationExpression",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.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 h={__proto__:null},C=T(function(e,t){var n=b&&b.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=b&&b.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=b&&b.__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)}),v=T(function(e,t){var n=b&&b.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=b&&b.__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}}),Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return E.AST_TOKEN_TYPES}}),r(x,t),r(h,t),r(C,t)});function F({parent:e},t){for(;e&&e.type!==v.AST_NODE_TYPES.Program;){if(t(e))return e;e=e.parent}return null}function D(e){if(F(e,I)||function(e){const t=f(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=f(e,"ngStyle");return t instanceof Map&&("none"===t.get("display")||"hidden"===t.get("visibility"))}(e)||function(e){return"none"===f(e,"style.display")||"true"===String(f(e,"style.display.none"))||"hidden"===f(e,"style.visibility")||"true"===String(f(e,"style.visibility.hidden"))}(e)||B(e,"aria-hidden")||B(e,"hidden"))return!0;if("INPUT"!==e.name.toUpperCase())return!1;const t=f(e,"type");return"string"==typeof t&&"HIDDEN"===t.toUpperCase()}function B(e,t){const n=f(e,t);return""===n||"true"===String(n)}function I(e){return e instanceof n.TmplAstElement&&D(e)}const w=new Set(["aria-label","innerHtml","innerHTML","innerText","outerHTML","title"]);var N=c({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}> should have content"}},defaultOptions:[],create(e){const t=l(e);return{"Element$1[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"(n){if(D(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 O(){return(O=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 P(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"],_=["label"];var R=c({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",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:O({},k),labelAttributes:O({},k),labelComponents:O({},k)},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:L,labelAttributes:$,labelComponents:_}],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([..._,...null!=n?n:[]])}}(t);var s;return{[`Element$1[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=>P(t,e)))}(r,t))return;const s=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:s,messageId:"accessibilityLabelFor"})}}}});const K="accessibility-label-has-associated-control",j=["input","meter","output","progress","select","textarea"],M=[{inputs:["for","htmlFor"],selector:"label"}];var q=c({name:K,meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",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$1[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=>P(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=c({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that the `scope` attribute is only used on the `<th>` element",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$1[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=c({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",recommended:!1},hasSuggestions:!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$1[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=c({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",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=c({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.",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element$1(t){if(!J().has(t.name))return;if(function(e){const t=f(e,"role");return"string"==typeof t&&te.has(t)}(t)||D(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===f(t,e.name))))}(null!=t?t:[],e)}return!!function(){if(null===Z){const e=[...r.roles.keys()],t=[...r.elementRoles.entries()],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.entries()],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.entries()].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=c({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{conditionalComplexity:"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||a.value.ast instanceof n.Interpolation)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:"conditionalComplexity",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:"conditionalComplexity",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=c({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",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=c({name:"eqeqeq",meta:{type:"suggestion",docs:{description:"Requires `===` and `!==` in place of `==` and `!=`",recommended:"error"},hasSuggestions:!0,fixable:"code",schema:[{type:"object",properties:{allowNullOrUndefined:{type:"boolean",default:ie.allowNullOrUndefined}},additionalProperties:!1}],messages:{eqeqeq:"Expected `{{expectedOperation}}` but received `{{actualOperation}}`",suggestStrictEquality:"Replace `{{actualOperation}}` with `{{expectedOperation}}`"}},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&&(ge(a)||ge(s)))return;const c={actualOperation:o,expectedOperation:`${o}=`};e.report(O({loc:{start:n.getLocFromIndex(u),end:n.getLocFromIndex(i)},messageId:"eqeqeq",data:c},fe(a)||fe(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=F(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 fe(e){return de(e)&&"string"==typeof e.value&&(t=e.value,!(!Number.isNaN(Number.parseFloat(String(t)))&&Number.isFinite(Number(t))));var t}function ge(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"]),be={checkAttributes:!0,checkId:!0,checkDuplicateId:!0,checkText:!0,ignoreAttributes:[...Ae]},Te="https://angular.io/guide/i18n",Ee=`${Te}#mark-element-attributes-for-translations`,xe=`${Te}#mark-plurals-and-alternates-for-translation`,he=`${Te}#mark-text-for-translations`,Ce=`${Te}#manage-marked-text-with-custom-ids`,ve=`${Te}#define-unique-custom-ids`,Fe=`${Te}-common-prepare#i18n-metadata-for-translation`;var De=c({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",recommended:!1},fixable:"code",hasSuggestions:!0,schema:[{type:"object",properties:{boundTextAllowedPattern:{type:"string"},checkAttributes:{type:"boolean",default:be.checkAttributes},checkDuplicateId:{type:"boolean",default:be.checkDuplicateId},checkId:{type:"boolean",default:be.checkId},checkText:{type:"boolean",default:be.checkText},ignoreAttributes:{type:"array",items:{type:"string"},default:[...Ae]},ignoreTags:{type:"array",items:{type:"string"}},requireDescription:{type:"boolean",default:be.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 ${he}`,i18nCustomIdOnAttribute:`Missing custom ID on attribute "i18n-{{attributeName}}". See more at ${Ce}`,i18nCustomIdOnElement:`Missing custom ID on element. See more at ${Ce}`,i18nDuplicateCustomId:`Duplicate custom ID "@@{{customId}}". See more at ${ve}`,suggestAddI18nAttribute:"Add the `i18n` attribute",i18nMissingDescription:`Missing i18n description on element. See more at ${Fe}`}},defaultOptions:[be],create(e,[{boundTextAllowedPattern:t,checkAttributes:r,checkId:a,checkDuplicateId:o,checkText:s,ignoreAttributes:u,ignoreTags:i,requireDescription:c}]){const p=l(e),m=e.getSourceCode(),d=t?new RegExp(t):Se,f=new Set([...Ae,...null!=u?u:[]]),g=new Set(i),y=new Map;return O({},(a||c)&&{"Element$1[i18n]"(t){!function({i18n:{description:t,customId:n},name:r,parent:o,sourceSpan:s}){if(g.has(r)||Ie(o))return;const u=p.convertNodeSourceSpanToLoc(s);if(a)if(we(n))e.report({messageId:"i18nCustomIdOnElement",loc:u});else{var i;const e=null!=(i=y.get(n))?i:[];y.set(n,[...e,s])}c&&we(t)&&e.report({messageId:"i18nMissingDescription",loc:u})}(t)}},(r||a||c)&&{[`Element$1 > 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=p.convertNodeSourceSpanToLoc(null!=n?n:u);if(t){const{customId:n,description:r}=t;if(a)if(we(n))e.report({messageId:"i18nCustomIdOnAttribute",loc:l,data:{attributeName:o}});else{var d;const e=null!=(d=y.get(n))?d:[];y.set(n,[...e,u])}c&&we(r)&&e.report({messageId:"i18nMissingDescription",loc:l,data:{attributeName:o}})}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)}(f,s,o,i)||e.report({messageId:"i18nAttribute",loc:l,data:{attributeName:o},fix:e=>{const{end:t}=p.convertNodeSourceSpanToLoc(u),n=m.getIndexFromLoc(t);return e.insertTextAfterRange([n,n],` i18n-${o}`)}})}(t)}},s&&{[`BoundText, Icu$1, Text$3[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)}(d,t)||Be(a)&&(a.i18n||g.has(a.name)))return;const s=p.convertNodeSourceSpanToLoc(o),u=e=>function(e,t,n,r,a){return Be(a)?F(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)}(m,p,e,s,a);e.report(O({messageId:"i18nAttributeOnIcuOrText",loc:s},null!=a&&null!=(r=a.children)&&r.filter(Be).length?{suggest:[{messageId:"suggestAddI18nAttribute",fix:u}]}:{fix:u}))}(t)}},{"Program:exit"(){!function(){if(o)for(const[t,n]of y){if(n.length<=1)break;for(const r of n){const n=p.convertNodeSourceSpanToLoc(r);e.report({messageId:"i18nDuplicateCustomId",loc:n,data:{customId:t}})}}y.clear()}()}})}});function Be(e){return e instanceof n.TmplAstElement}function Ie(e){return Boolean(Be(e)&&e.i18n)}function we(e){return!e||0===e.trim().length}const Ne="https://www.w3.org/WAI/WCAG21/Understanding/keyboard";var Oe=c({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 ${Ne}`,recommended:!1},schema:[],messages:{mouseEventsHaveKeyEvents:`\`{{mouseEvent}}\` must be accompanied by \`{{keyEvent}}\` for accessibility (${Ne})`}},defaultOptions:[],create(e){const t=l(e),n=U([...J()]);return[["blur","mouseout"],["focus","mouseover"]].reduce((r,[a,o])=>O({},r,{[`Element$1[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}})}}),{})}}),Pe=c({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of Angular\'s type system',recommended:!1},hasSuggestions:!0,schema:[],messages:{noAny:'Avoid using "$any" in templates',suggestRemoveAny:"Remove $any"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'Call[receiver.name="$any"]'({receiver:r,sourceSpan:{end:a,start:o}}){if(!(r instanceof n.PropertyRead))return;if(!(r.receiver instanceof n.ThisReceiver||r.receiver instanceof n.ImplicitReceiver))return;const s=r.nameSpan;e.report({messageId:"noAny",loc:{start:t.getLocFromIndex(o),end:t.getLocFromIndex(a)},suggest:[{messageId:"suggestRemoveAny",fix:e=>[e.removeRange([s.start,s.end+1]),e.removeRange([a-1,a])]}]})}}}}),ke=c({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensures that the `autofocus` attribute is not used",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$1[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=c({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'Call[receiver.name!="$any"]'(n){if(Boolean(F(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 _e=c({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",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$1[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 Ke=c({name:"no-duplicate-attributes",meta:{type:"problem",docs:{description:"Ensures that there are no duplicate input properties or output event listeners",recommended:!1},hasSuggestions:!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$1({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=c({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that async pipe results are not negated",recommended:"error"},hasSuggestions:!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=c({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the `tabindex` attribute is not positive",recommended:!1},hasSuggestions:!0,schema:[],messages:{noPositiveTabindex:"The `tabindex` attribute should not be positive",suggestNonNegativeTabindex:'Use `tabindex="{{tabindex}}"`'}},defaultOptions:[],create(e){const t=l(e);return{[`Element$1[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=c({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used",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:O({},r,{column:r.column-1}),end:O({},a,{column:a.column+1})};e.report({messageId:"useTrackByFunction",loc:o})}}}});function Je(e){return e instanceof n.TmplAstBoundAttribute&&"ngForTrackBy"===e.name}const Ue=["button","submit","reset"];var We=c({name:"button-has-type",meta:{type:"suggestion",docs:{description:"Ensures that a button has a valid type specified",recommended:!1},schema:[],messages:{missingType:"Type for <button> is missing",invalidType:'"{{type}}" can not be used as a type for <button>'}},defaultOptions:[],create(e){const t=l(e);return{"Element$1[name=button]"(r){(function({inputs:e,attributes:t}){return[...e,...t].some(({name:e})=>"type"===e)})(r)||e.report({loc:t.convertNodeSourceSpanToLoc(r.sourceSpan),messageId:"missingType"});const a=function(e){const t=e.attributes.find(({name:e,value:t})=>"type"===e&&!Ue.includes(t));if(t)return{sourceSpan:t.sourceSpan,value:t.value};for(const{name:t,value:r,sourceSpan:a}of e.inputs)if("type"===t&&r instanceof n.ASTWithSource&&r.ast instanceof n.LiteralPrimitive&&!Ue.includes(r.ast.value))return{value:r.ast.value,sourceSpan:a};return null}(r);null!=a&&e.report({loc:t.convertNodeSourceSpanToLoc(a.sourceSpan),messageId:"invalidType",data:{type:a.value}})}}}});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","@angular-eslint/template/button-has-type":"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":g,"accessibility-elements-content":N,"accessibility-label-for":R,[K]: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:De,"mouse-events-have-key-events":Oe,"no-any":Pe,"no-autofocus":ke,"no-call-expression":Le,"no-distracting-elements":_e,"no-duplicate-attributes":Ke,"no-negated-async":Me,"no-positive-tabindex":qe,"use-track-by-function":Xe,"button-has-type":We}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.3",
|
|
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": "14.0.0-alpha.
|
|
20
|
+
"@angular-eslint/bundled-angular-compiler": "14.0.0-alpha.3",
|
|
21
21
|
"@typescript-eslint/experimental-utils": "5.27.1",
|
|
22
22
|
"aria-query": "5.0.0",
|
|
23
23
|
"axobject-query": "3.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@angular-eslint/utils": "14.0.0-alpha.
|
|
26
|
+
"@angular-eslint/utils": "14.0.0-alpha.3",
|
|
27
27
|
"@types/aria-query": "5.0.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"eslint": "^7.0.0 || ^8.0.0",
|
|
31
31
|
"typescript": "*"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "f29d389822b4a0ab2693771b5494073b883c8946"
|
|
34
34
|
}
|