@angular-eslint/eslint-plugin 12.3.1-alpha.0 → 12.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [12.3.1](https://github.com/angular-eslint/angular-eslint/compare/v12.3.0...v12.3.1) (2021-07-15)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **eslint-plugin:** handle literal `outputs` properly for [*-output-*] rules ([#595](https://github.com/angular-eslint/angular-eslint/issues/595)) ([8621a62](https://github.com/angular-eslint/angular-eslint/commit/8621a62a5360caac33fd87001e2928d7995a5a01))
11
+
6
12
  # [12.3.0](https://github.com/angular-eslint/angular-eslint/compare/v12.2.2...v12.3.0) (2021-07-13)
7
13
 
8
14
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var e=require("@typescript-eslint/experimental-utils"),t=require("@angular/compiler");const r=e.ESLintUtils.RuleCreator(e=>"https://github.com/angular-eslint/angular-eslint");function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var s=o(function(e,t){var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,(r=t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})).ArrayExpression="ArrayExpression",r.ArrayPattern="ArrayPattern",r.ArrowFunctionExpression="ArrowFunctionExpression",r.AssignmentExpression="AssignmentExpression",r.AssignmentPattern="AssignmentPattern",r.AwaitExpression="AwaitExpression",r.BinaryExpression="BinaryExpression",r.BlockStatement="BlockStatement",r.BreakStatement="BreakStatement",r.CallExpression="CallExpression",r.CatchClause="CatchClause",r.ChainExpression="ChainExpression",r.ClassBody="ClassBody",r.ClassDeclaration="ClassDeclaration",r.ClassExpression="ClassExpression",r.ClassProperty="ClassProperty",r.ConditionalExpression="ConditionalExpression",r.ContinueStatement="ContinueStatement",r.DebuggerStatement="DebuggerStatement",r.Decorator="Decorator",r.DoWhileStatement="DoWhileStatement",r.EmptyStatement="EmptyStatement",r.ExportAllDeclaration="ExportAllDeclaration",r.ExportDefaultDeclaration="ExportDefaultDeclaration",r.ExportNamedDeclaration="ExportNamedDeclaration",r.ExportSpecifier="ExportSpecifier",r.ExpressionStatement="ExpressionStatement",r.ForInStatement="ForInStatement",r.ForOfStatement="ForOfStatement",r.ForStatement="ForStatement",r.FunctionDeclaration="FunctionDeclaration",r.FunctionExpression="FunctionExpression",r.Identifier="Identifier",r.IfStatement="IfStatement",r.ImportDeclaration="ImportDeclaration",r.ImportDefaultSpecifier="ImportDefaultSpecifier",r.ImportExpression="ImportExpression",r.ImportNamespaceSpecifier="ImportNamespaceSpecifier",r.ImportSpecifier="ImportSpecifier",r.JSXAttribute="JSXAttribute",r.JSXClosingElement="JSXClosingElement",r.JSXClosingFragment="JSXClosingFragment",r.JSXElement="JSXElement",r.JSXEmptyExpression="JSXEmptyExpression",r.JSXExpressionContainer="JSXExpressionContainer",r.JSXFragment="JSXFragment",r.JSXIdentifier="JSXIdentifier",r.JSXMemberExpression="JSXMemberExpression",r.JSXNamespacedName="JSXNamespacedName",r.JSXOpeningElement="JSXOpeningElement",r.JSXOpeningFragment="JSXOpeningFragment",r.JSXSpreadAttribute="JSXSpreadAttribute",r.JSXSpreadChild="JSXSpreadChild",r.JSXText="JSXText",r.LabeledStatement="LabeledStatement",r.Literal="Literal",r.LogicalExpression="LogicalExpression",r.MemberExpression="MemberExpression",r.MetaProperty="MetaProperty",r.MethodDefinition="MethodDefinition",r.NewExpression="NewExpression",r.ObjectExpression="ObjectExpression",r.ObjectPattern="ObjectPattern",r.Program="Program",r.Property="Property",r.RestElement="RestElement",r.ReturnStatement="ReturnStatement",r.SequenceExpression="SequenceExpression",r.SpreadElement="SpreadElement",r.Super="Super",r.SwitchCase="SwitchCase",r.SwitchStatement="SwitchStatement",r.TaggedTemplateExpression="TaggedTemplateExpression",r.TemplateElement="TemplateElement",r.TemplateLiteral="TemplateLiteral",r.ThisExpression="ThisExpression",r.ThrowStatement="ThrowStatement",r.TryStatement="TryStatement",r.UnaryExpression="UnaryExpression",r.UpdateExpression="UpdateExpression",r.VariableDeclaration="VariableDeclaration",r.VariableDeclarator="VariableDeclarator",r.WhileStatement="WhileStatement",r.WithStatement="WithStatement",r.YieldExpression="YieldExpression",r.TSAbstractClassProperty="TSAbstractClassProperty",r.TSAbstractKeyword="TSAbstractKeyword",r.TSAbstractMethodDefinition="TSAbstractMethodDefinition",r.TSAnyKeyword="TSAnyKeyword",r.TSArrayType="TSArrayType",r.TSAsExpression="TSAsExpression",r.TSAsyncKeyword="TSAsyncKeyword",r.TSBigIntKeyword="TSBigIntKeyword",r.TSBooleanKeyword="TSBooleanKeyword",r.TSCallSignatureDeclaration="TSCallSignatureDeclaration",r.TSClassImplements="TSClassImplements",r.TSConditionalType="TSConditionalType",r.TSConstructorType="TSConstructorType",r.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",r.TSDeclareFunction="TSDeclareFunction",r.TSDeclareKeyword="TSDeclareKeyword",r.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",r.TSEnumDeclaration="TSEnumDeclaration",r.TSEnumMember="TSEnumMember",r.TSExportAssignment="TSExportAssignment",r.TSExportKeyword="TSExportKeyword",r.TSExternalModuleReference="TSExternalModuleReference",r.TSFunctionType="TSFunctionType",r.TSImportEqualsDeclaration="TSImportEqualsDeclaration",r.TSImportType="TSImportType",r.TSIndexedAccessType="TSIndexedAccessType",r.TSIndexSignature="TSIndexSignature",r.TSInferType="TSInferType",r.TSInterfaceBody="TSInterfaceBody",r.TSInterfaceDeclaration="TSInterfaceDeclaration",r.TSInterfaceHeritage="TSInterfaceHeritage",r.TSIntersectionType="TSIntersectionType",r.TSIntrinsicKeyword="TSIntrinsicKeyword",r.TSLiteralType="TSLiteralType",r.TSMappedType="TSMappedType",r.TSMethodSignature="TSMethodSignature",r.TSModuleBlock="TSModuleBlock",r.TSModuleDeclaration="TSModuleDeclaration",r.TSNamedTupleMember="TSNamedTupleMember",r.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",r.TSNeverKeyword="TSNeverKeyword",r.TSNonNullExpression="TSNonNullExpression",r.TSNullKeyword="TSNullKeyword",r.TSNumberKeyword="TSNumberKeyword",r.TSObjectKeyword="TSObjectKeyword",r.TSOptionalType="TSOptionalType",r.TSParameterProperty="TSParameterProperty",r.TSParenthesizedType="TSParenthesizedType",r.TSPrivateKeyword="TSPrivateKeyword",r.TSPropertySignature="TSPropertySignature",r.TSProtectedKeyword="TSProtectedKeyword",r.TSPublicKeyword="TSPublicKeyword",r.TSQualifiedName="TSQualifiedName",r.TSReadonlyKeyword="TSReadonlyKeyword",r.TSRestType="TSRestType",r.TSStaticKeyword="TSStaticKeyword",r.TSStringKeyword="TSStringKeyword",r.TSSymbolKeyword="TSSymbolKeyword",r.TSTemplateLiteralType="TSTemplateLiteralType",r.TSThisType="TSThisType",r.TSTupleType="TSTupleType",r.TSTypeAliasDeclaration="TSTypeAliasDeclaration",r.TSTypeAnnotation="TSTypeAnnotation",r.TSTypeAssertion="TSTypeAssertion",r.TSTypeLiteral="TSTypeLiteral",r.TSTypeOperator="TSTypeOperator",r.TSTypeParameter="TSTypeParameter",r.TSTypeParameterDeclaration="TSTypeParameterDeclaration",r.TSTypeParameterInstantiation="TSTypeParameterInstantiation",r.TSTypePredicate="TSTypePredicate",r.TSTypeQuery="TSTypeQuery",r.TSTypeReference="TSTypeReference",r.TSUndefinedKeyword="TSUndefinedKeyword",r.TSUnionType="TSUnionType",r.TSUnknownKeyword="TSUnknownKeyword",r.TSVoidKeyword="TSVoidKeyword",(n=t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={})).Boolean="Boolean",n.Identifier="Identifier",n.JSXIdentifier="JSXIdentifier",n.JSXText="JSXText",n.Keyword="Keyword",n.Null="Null",n.Numeric="Numeric",n.Punctuator="Punctuator",n.RegularExpression="RegularExpression",n.String="String",n.Template="Template",n.Block="Block",n.Line="Line"});Object.defineProperty(exports,"__esModule",{value:!0});var i={__proto__:null};Object.defineProperty(exports,"__esModule",{value:!0});var l={__proto__:null},c=o(function(e,t){var r=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=a&&a.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=a&&a.__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)&&r(t,e,a);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=void 0,t.TSESTree=o(s)}),p=o(function(e,t){var r=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=a&&a.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};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 s.AST_NODE_TYPES}});var o=s;Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return o.AST_TOKEN_TYPES}}),n(i,t),n(l,t),n(c,t)});const u=Object.keys;var d,m,g,f;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(d||(d={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(m||(m={})),function(e){e.HostListener="HostListener"}(g||(g={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(f||(f={}));const y=n({},m,g,f);var h,S;!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.DoBootstrap="DoBootstrap",e.DoCheck="DoCheck",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit"}(h||(h={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngDoBootstrap="ngDoBootstrap",e.ngDoCheck="ngDoCheck",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit"}(S||(S={}));const T="camelCase",x="kebab-case",v=u(d),b=u(y),E=u(h),w=u(S),I=new Map([[d.Component,new Set([S.ngAfterContentChecked,S.ngAfterContentInit,S.ngAfterViewChecked,S.ngAfterViewInit,S.ngOnChanges,S.ngOnDestroy,S.ngOnInit,S.ngDoCheck])],[d.Directive,new Set([S.ngAfterContentChecked,S.ngAfterContentInit,S.ngAfterViewChecked,S.ngAfterViewInit,S.ngOnChanges,S.ngOnDestroy,S.ngOnInit,S.ngDoCheck])],[d.Injectable,new Set([S.ngOnDestroy])],[d.NgModule,new Set([S.ngDoBootstrap])],[d.Pipe,new Set([S.ngOnDestroy])]]),D=new Set(b),P=new Set(v),C=new Map([[d.Component,D],[d.Directive,D],[d.Injectable,new Set([y.Host,y.Inject,y.Optional,y.Self,y.SkipSelf])],[d.NgModule,new Set([y.Host,y.Inject,y.Optional,y.Self,y.SkipSelf])],[d.Pipe,new Set([y.Host,y.Inject,y.Optional,y.Self,y.SkipSelf])]]);function O(e){return e.type===p.AST_NODE_TYPES.CallExpression}function A(e){return e.type===p.AST_NODE_TYPES.MemberExpression}function k(e){return e.type===p.AST_NODE_TYPES.ClassDeclaration}function N(e){return function(e){return e.type===p.AST_NODE_TYPES.ClassProperty}(e)||U(e)}function M(e){return e.type===p.AST_NODE_TYPES.ObjectExpression}function j(e){return e.type===p.AST_NODE_TYPES.ArrayExpression}function _(e){return e.type===p.AST_NODE_TYPES.Property}function R(e){return e.type===p.AST_NODE_TYPES.Program}function B(e){return e.type===p.AST_NODE_TYPES.Literal}function $(e){return e.type===p.AST_NODE_TYPES.TemplateLiteral}function L(e){return e.type===p.AST_NODE_TYPES.ImportDeclaration}function K(e){return B(e)&&"string"==typeof e.value}function U(e){return e.type===p.AST_NODE_TYPES.MethodDefinition}function V({parent:e},t){for(;e&&!R(e);){if(t(e))return e;e=e.parent}return null}function F(e,t){let r=e;for(;r=r.parent;)if(R(r))return r.body.filter(e=>L(e)&&e.source.value===t);return r}function J(t,r,n,a){const{implements:o}=r;if(!o)return;const s=o.map(({expression:e})=>e).filter(e.ASTUtils.isIdentifier).find(({name:e})=>e===n);if(!s)return;const i=o[0].expression===s;if(i&&o[o.length-1].expression===s&&r.id)return a.removeRange([r.id.range[1],o[0].range[1]]);const l=t.getTokenAfter(s);if(i&&l)return a.removeRange([s.range[0],l.range[1]]);const c=t.getTokenBefore(s);return c?a.removeRange([c.range[0],s.range[1]]):void 0}function X(t,r,n){const a=t.getTokenAfter(r);return a&&e.ASTUtils.isCommaToken(a)?n.removeRange([r.range[0],a.range[1]]):n.remove(r)}function q(e,t){for(const r of e){const e=r.specifiers.find(e=>e.type===p.AST_NODE_TYPES.ImportSpecifier&&e.imported.name===t);if(e)return{importDeclaration:r,importSpecifier:e}}}function Y(e){return e.slice(-1)[0]}function H(e,t,r,n){const a=F(e,t);if(null==a||!a.length)return n.insertTextAfterRange([0,0],`import { ${r} } from '${t}';\n`);if(q(a,r))return;const o=Y(a[0].specifiers);return n.insertTextAfter(o,`, ${r}`)}function W(e,t,r,n){var a;const{importDeclaration:o,importSpecifier:s}=null!=(a=q(t,r))?a:{};if(!o||!s)return;const i=o.specifiers[0]===s;if(i&&o.specifiers[o.specifiers.length-1]===s)return n.remove(o);const l=e.getTokenAfter(s);if(i&&l)return n.removeRange([s.range[0],l.range[1]]);const c=e.getTokenBefore(s);return c?n.removeRange([c.range[0],s.range[1]]):void 0}const z=e=>{var t;return k(e)?null==(t=e.id)?void 0:t.name:e.parent?z(e.parent):void 0},G=({decorators:e})=>null==e?void 0:e.map(Q).filter(ue).find(se),Q=({expression:t})=>e.ASTUtils.isIdentifier(t)?t.name:O(t)&&e.ASTUtils.isIdentifier(t.callee)?t.callee.name:void 0,Z=e=>{var t;return null!=(t=e.implements)?t:[]},ee=t=>Z(t).map(({expression:e})=>A(e)?e.property:e).filter(e.ASTUtils.isIdentifier).map(({name:e})=>e),te=e=>ee(e).filter(ae),re=new Set(E),ne=new Set(w),ae=e=>re.has(e),oe=e=>ne.has(e),se=e=>P.has(e),ie=(t,r)=>{var n;return null==(n=((t,r)=>{var n;return null==(n=(({expression:e})=>{if(!O(e)||0===e.arguments.length)return;const[t]=e.arguments;return M(t)&&t.properties?t:void 0})(t))?void 0:n.properties.filter(_).find(({key:t})=>e.ASTUtils.isIdentifier(t)&&t.name===r)})(t,r))?void 0:n.value},le=({body:{body:e}})=>e.filter(U),ce=t=>K(t.key)?t.key.value:e.ASTUtils.isIdentifier(t.key)?t.key.name:void 0;function pe(e){return Array.isArray(e)?e:e?[e]:[]}const ue=e=>null!=e,de={attribute:e=>0!==e.length,camelCase:e=>/^[a-zA-Z0-9[\]]+$/.test(e),element:e=>null!==e,kebabCase:e=>/^[a-z0-9-]+-[a-z0-9-]+$/.test(e),prefix(e,t){const r=new RegExp(`^\\[?(${e})`);return n=>{if(!e)return!0;if(!r.test(n))return!1;const a=n.replace(r,"");if(t===T)return!a||a[0]===a[0].toUpperCase();if(t===x)return!a||"-"===a[0];throw Error("Invalid selector style!")}}},me=e=>e.replace(/-[a-zA-Z]/g,({1:e})=>e.toUpperCase()),ge=e=>{const t=e.length;return 1===t?`"${e[0]}"`:`${e.map(e=>`"${e}"`).slice(0,t-1).join(", ")} or "${[...e].pop()}"`},fe=e=>RegExp(`^(${e.join("|")})$`);function ye(t){return e.ASTUtils.isIdentifier(t)?t.name:B(t)?String(t.value):($(t)?t.quasis[0]:t).value.raw}function he(e,t){return B(e)?`'${t}'`:`\`${t}\``}function Se(e){return`${e[0].toUpperCase()}${e.slice(1)}`}function Te(e){return e.replace(/[[\]\s]/g,"")}var xe=r({name:"contextual-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes use contextual decorators in its body",category:"Best Practices",recommended:!1},schema:[],messages:{contextualDecorator:'Decorator out of context for "@{{classDecoratorName}}()"'}},defaultOptions:[],create:e=>({"MethodDefinition[kind=/^(get|set|method)$/], ClassProperty, TSParameterProperty"(t){!function(e,t){var r;if(null==(r=t.decorators)||!r.length)return;const n=V(t,k);if(!n)return;const a=G(n);if(a)for(const r of t.decorators)ve(e,r,a)}(e,t)}})});function ve(e,t,r){const n=Q(t);if(!n||!D.has(n))return;const a=C.get(r);null!=a&&a.has(n)||e.report({node:t,messageId:"contextualDecorator",data:{classDecoratorName:r}})}const be="ClassDeclaration > Decorator[expression.callee.name=/^(Component|Directive)$/]",Ee='ClassDeclaration > Decorator[expression.callee.name="Component"]',we='ClassDeclaration > Decorator[expression.callee.name="Directive"]',Ie='ClassDeclaration > Decorator[expression.callee.name="Pipe"]',De='Decorator[expression.callee.name="Output"]',Pe=`:matches(${Ee} Property:matches([key.name="selector"], [key.value="selector"]) :matches(Literal, TemplateElement), ${we} Property:matches([key.name="selector"], [key.value="selector"]) :matches(Literal, TemplateElement))`,Ce=`${be} Property:matches([key.name="inputs"], [key.value="inputs"]) > ArrayExpression :matches(Literal, TemplateElement)`,Oe=":matches(ClassProperty, MethodDefinition[kind='set']) Decorator[expression.callee.name=\"Input\"] :matches(Literal, TemplateElement)",Ae=":matches(ClassProperty, MethodDefinition[kind='set'])[computed=false]:has(Decorator[expression.callee.name=\"Input\"]) > :matches(Identifier, Literal)",ke=`${be} Property[key.name='outputs'] > ArrayExpression :matches(Literal, TemplateElement)`,Ne=`:matches(ClassProperty, MethodDefinition[kind='get']) ${De} :matches(Literal, TemplateElement)`,Me=`:matches(ClassProperty, MethodDefinition[kind='get'])[computed=false]:has(${De}) > :matches(Identifier, Literal)`;var je=r({name:"component-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"Component class names should end with one of these suffixes: {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create:(e,[{suffixes:t}])=>({[Ee](r){const n=r.parent,a=z(n);a&&t.some(e=>a.endsWith(e))||e.report({node:n.id?n.id:n,messageId:"componentClassSuffix",data:{suffixes:ge(t)}})}})});const _e=/\r\n|\r|\n/;function Re(e){return $(e)?e.quasis[0].value.raw.trim().split(_e).length:B(e)?e.raw.trim().split(_e).length:0}var Be=r({name:"component-max-inline-declarations",meta:{type:"suggestion",docs:{description:"Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.io/guide/styleguide#style-05-04",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{template:{minimum:0,type:"number"},styles:{minimum:0,type:"number"},animations:{minimum:0,type:"number"}},additionalProperties:!1}],messages:{componentMaxInlineDeclarations:"`{{propertyType}}` has too many lines ({{lineCount}}). Maximum allowed is {{max}} (https://angular.io/guide/styleguide#style-05-04)"}},defaultOptions:[{template:3,styles:3,animations:15}],create:(e,[{template:t=3,styles:r=3,animations:n=15}])=>({[`${Ee} Property[key.name='template']`]({value:r}){const n=Re(r);n<=t||e.report({node:r,messageId:"componentMaxInlineDeclarations",data:{lineCount:n,max:t,propertyType:"template"}})},[`${Ee} Property[key.name='styles']`]({value:t}){if(!j(t))return;const n=t.elements.reduce((e,t)=>e+Re(t),0);n<=r||e.report({node:t,messageId:"componentMaxInlineDeclarations",data:{lineCount:n,max:r,propertyType:"styles"}})},[`${Ee} Property[key.name='animations']`]({value:t}){if(!j(t)||0===t.elements.length)return;const r=Math.max(t.loc.end.line-t.loc.start.line-2,1);r<=n||e.report({node:t,messageId:"componentMaxInlineDeclarations",data:{lineCount:r,max:n,propertyType:"animations"}})}})});const $e="attribute",Le="element",Ke={[$e]:"attrs",[Le]:Le},Ue=(e,t,r)=>{r.report({node:e,messageId:"prefixFailure",data:{prefix:ge(pe(t))}})},Ve=(e,t,r)=>{r.report({node:e,messageId:"styleFailure",data:{style:t}})},Fe=(e,t,r)=>{r.report({node:e,messageId:"typeFailure",data:{type:t}})},Je=(e,t,r)=>{const n=pe(e),a=r,o=n.length>0&&n.every(e=>-1!==[Le,$e].indexOf(e)),s=t.length>0,i=-1!==[T,x].indexOf(a);return o&&s&&i},Xe=(e,r,n,a)=>{const o=pe(r||["attrs",Le]).reduce((e,t)=>e.concat(Ke[t]),[]),s=a===x?de.kebabCase:de.camelCase;let i=null;if(e&&B(e)?i=t.CssSelector.parse(e.raw):e&&$(e)&&e.quasis[0]&&(i=t.CssSelector.parse(e.quasis[0].value.raw)),!i)return null;const l=((e,t)=>e.reduce((e,r)=>{const n=t.reduce((e,t)=>{const n=r[t];return n?e.concat(n):e},[]);return e.concat(n)},[]))(i,o),c=l.some(e=>n.some(t=>de.prefix(t,a)(e))),p=l.some(e=>s(e));return{hasExpectedPrefix:c,hasExpectedType:l.length>0,hasExpectedStyle:p}};var qe=r({name:"component-selector",meta:{type:"suggestion",docs:{description:"Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02\n and https://angular.io/guide/styleguide#style-05-03.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Le,$e]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[T,x]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should start with one of these prefixes: {{prefix}} (https://angular.io/guide/styleguide#style-02-07)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-05-02)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-05-03)",shadowDomEncapsulatedStyleFailure:`The selector of a ShadowDom-encapsulated component should be \`${x}\` (https://github.com/angular-eslint/angular-eslint/issues/534)`}},defaultOptions:[{type:"",prefix:"",style:""}],create:(t,[{type:r,prefix:n,style:a}])=>({[Ee](o){const s=ie(o,"selector");if(!s)return;if(!Je(r,n,a))return;const i=a!==x&&function(t){const r=ie(t,"encapsulation");return r&&A(r)&&e.ASTUtils.isIdentifier(r.object)&&"ViewEncapsulation"===r.object.name&&e.ASTUtils.isIdentifier(r.property)&&"ShadowDom"===r.property.name}(o)?x:a,l=Xe(s,r,pe(n),i);null!==l&&(l.hasExpectedType?l.hasExpectedStyle?l.hasExpectedPrefix||Ue(s,n,t):a===i?Ve(s,a,t):t.report({node:s,messageId:"shadowDomEncapsulatedStyleFailure"}):Fe(s,r,t))}})}),Ye=r({name:"contextual-lifecycle",meta:{type:"problem",docs:{description:"Ensures that lifecycle methods are used in a correct context",category:"Possible Errors",recommended:"error"},schema:[],messages:{contextualLifecycle:"Angular will not invoke the `{{methodName}}` lifecycle method within `@{{classDecoratorName}}()` classes"}},defaultOptions:[],create(e){function t({parent:t},r){const n=t,a=I.get(r),o=le(n);for(const t of o){const n=ce(t);!n||!oe(n)||null!=a&&a.has(n)||e.report({node:t.key,messageId:"contextualLifecycle",data:{classDecoratorName:r,methodName:n}})}}return{[Ee](e){t(e,d.Component)},[we](e){t(e,d.Directive)},'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(e){t(e,d.Injectable)},'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(e){t(e,d.NgModule)},[Ie](e){t(e,d.Pipe)}}}}),He=r({name:"directive-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{directiveClassSuffix:"Directive class names should end with one of these suffixes: {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Directive"]}],create:(e,[{suffixes:t}])=>({[we](r){if(!ie(r,"selector"))return;const n=r.parent,a=z(n),o=ee(n).some(e=>e.endsWith("Validator")),s=t.concat(o?"Validator":[]);var i;a&&s.some(e=>a.endsWith(e))||e.report({node:null!=(i=n.id)?i:n,messageId:"directiveClassSuffix",data:{suffixes:ge(s)}})}})}),We=r({name:"directive-selector",meta:{type:"suggestion",docs:{description:"Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Le,$e]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[T,x]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should start with one of these prefixes: {{prefix}} (https://angular.io/guide/styleguide#style-02-08)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-02-06)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-02-06)"}},defaultOptions:[{type:"",prefix:"",style:""}],create:(e,[{type:t,prefix:r,style:n}])=>({[we](a){const o=ie(a,"selector");if(!o)return;if(!Je(t,r,n))return;const s=Xe(o,t,pe(r),n);null!==s&&(s.hasExpectedType?s.hasExpectedStyle?s.hasExpectedPrefix||Ue(o,r,e):Ve(o,n,e):Fe(o,t,e))}})}),ze=r({name:"no-attribute-decorator",meta:{type:"problem",docs:{description:"Disallows usage of @Attribute decorator.",category:"Possible Errors",recommended:!1},schema:[],messages:{noAttributeDecorator:"The usage of @Attribute is considered a bad practice. Use @Input instead"}},defaultOptions:[],create:e=>({'ClassDeclaration MethodDefinition[key.name="constructor"] Decorator[expression.callee.name="Attribute"]'(t){e.report({node:t,messageId:"noAttributeDecorator"})}})});const Ge=[h.DoCheck,h.OnChanges],Qe=[S.ngDoCheck,S.ngOnChanges];var Ze=r({name:"no-conflicting-lifecycle",meta:{type:"suggestion",docs:{description:"Ensures that directives not implement conflicting lifecycle interfaces.",category:"Best Practices",recommended:"error"},schema:[],messages:{noConflictingLifecycleInterface:`Implementing ${h.DoCheck} and ${h.OnChanges} in a class is not recommended`,noConflictingLifecycleMethod:`Declaring ${S.ngDoCheck} and ${S.ngOnChanges} method in a class is not recommended`}},defaultOptions:[],create:t=>({ClassDeclaration(r){(r=>{const n=te(r);if(!Ge.every(e=>n.includes(e)))return;const a=Z(r).filter(t=>e.ASTUtils.isIdentifier(t.expression)&&ae(t.expression.name));for(const e of a)t.report({node:e,messageId:"noConflictingLifecycleInterface"})})(r),(r=>{const n=(e=>le(e).map(ce).filter(ue).filter(oe))(r);if(!Qe.every(e=>n.includes(e)))return;const a=le(r).filter(t=>e.ASTUtils.isIdentifier(t.key)&&oe(t.key.name));for(const e of a)t.report({node:e,messageId:"noConflictingLifecycleMethod"})})(r)}})}),et=r({name:"no-forward-ref",meta:{type:"suggestion",docs:{description:"Disallows usage of `forwardRef` references for DI",category:"Best Practices",recommended:!1},schema:[],messages:{noForwardRef:"Avoid using `forwardRef`"}},defaultOptions:[],create:e=>({'CallExpression[callee.type="Identifier"][callee.name="forwardRef"]'(t){e.report({node:t,messageId:"noForwardRef"})}})});const tt={allowStatic:!1};var rt=r({name:"no-host-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `host` metadata property. See more at https://angular.io/styleguide#style-06-03",category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{allowStatic:{type:"boolean",default:tt.allowStatic}},additionalProperties:!1}],messages:{noHostMetadataProperty:`Use @${y.HostBinding} or @${y.HostListener} rather than the \`host\` metadata property (https://angular.io/styleguide#style-06-03)`}},defaultOptions:[tt],create:(e,[{allowStatic:t}])=>({[`${be} Property[key.name="host"]`](r){(t&&M(r.value)?r.value.properties.filter(nt):[r]).forEach(t=>{e.report({node:t,messageId:"noHostMetadataProperty"})})}})});function nt(t){return _(t)&&!function(t){return!t.computed&&(e.ASTUtils.isIdentifier(t.key)||K(t.key)&&function({0:e}){return e.toLowerCase()!==e.toUpperCase()}(t.key.value))}(t)&&!function(e){return K(e.value)&&""===e.value.value}(t)}var at=r({name:"no-input-prefix",meta:{type:"suggestion",docs:{description:"Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{noInputPrefix:"Input bindings, including aliases, should not be named, nor prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[[Ce,Oe,Ae].join(",")](r){const[n,a]=ye(r).replace(/\s/g,"").split(":");t.some(e=>function(e,t,r){const n=RegExp(`^${e}(([^a-z])|(?=$))`);return n.test(t)||n.test(r)}(e,n,a))&&e.report({node:r,messageId:"noInputPrefix",data:{prefixes:ge(t)}})}})});let ot=null;function st(){var e;return null!=(e=ot)?e:ot=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-dragged","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"])}var it=r({name:"no-input-rename",meta:{type:"suggestion",docs:{description:"Ensures that input bindings are not aliased",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[{type:"object",properties:{allowedNames:{type:"array",items:{type:"string"},description:"A list with allowed input names",uniqueItems:!0}},additionalProperties:!1}],messages:{noInputRename:"Input bindings should not be aliased (https://angular.io/guide/styleguide#style-05-13)",suggestRemoveAliasName:"Remove alias name",suggestReplaceOriginalNameWithAliasName:"Remove alias name and use it as the original name"}},defaultOptions:[{allowedNames:[]}],create(t,[{allowedNames:r=[]}]){let n=new Set;const a=st();return{[Pe](e){n=new Set(Te(ye(e)).split(","))},[Oe](o){const s=V(o,N);if(!s||!e.ASTUtils.isIdentifier(s.key))return;const i=ye(o),l=ye(s.key);r.includes(i)||a.has(i)&&l===me(i)||(i===l?t.report({node:o,messageId:"noInputRename",fix:e=>e.remove(o)}):lt(n,l,i)||t.report({node:o,messageId:"noInputRename",suggest:[{messageId:"suggestRemoveAliasName",fix:e=>e.remove(o)},{messageId:"suggestReplaceOriginalNameWithAliasName",fix:e=>[e.remove(o),e.replaceText(s.key,i.includes("-")?`'${i}'`:i)]}]}))},[Ce](e){const[o,s]=Te(ye(e)).split(":");!s||r.includes(s)||a.has(s)&&o===me(s)||(s===o?t.report({node:e,messageId:"noInputRename",fix:t=>t.replaceText(e,he(e,o))}):lt(n,o,s)||t.report({node:e,messageId:"noInputRename",suggest:[["suggestRemoveAliasName",o],["suggestReplaceOriginalNameWithAliasName",s]].map(([t,r])=>({messageId:t,fix:t=>t.replaceText(e,he(e,r))}))}))},"ClassDeclaration:exit"(){n=new Set}}}});function lt(e,t,r){return[...e].some(e=>e===r||function(e,t){return`${e}${Se(t)}`}(e,t)===r)}var ct=r({name:"no-inputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `inputs` metadata property. See more at https://angular.io/styleguide#style-05-12",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputsMetadataProperty:"Use `@Input` rather than the `inputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:e=>({[`${be} Property:matches([key.name="inputs"], [key.value="inputs"])[computed=false]`](t){e.report({node:t,messageId:"noInputsMetadataProperty"})}})}),pt=r({name:"no-lifecycle-call",meta:{type:"suggestion",docs:{description:"Disallows explicit calls to lifecycle methods",category:"Best Practices",recommended:!1},schema:[],messages:{noLifecycleCall:"Avoid explicit calls to lifecycle methods"}},defaultOptions:[],create:t=>({[`ClassDeclaration CallExpression > MemberExpression[property.name=${fe([...ne])}]`]:r=>{const n=V(r,k);!n||!G(n)||function(e){return e.type===p.AST_NODE_TYPES.Super}(r.object)&&function(t){const r=V(t,U);return Boolean(r&&function({property:t},{key:r}){return e.ASTUtils.isIdentifier(t)&&e.ASTUtils.isIdentifier(r)&&t.name===r.name}(t,r))}(r)||t.report({node:r.parent,messageId:"noLifecycleCall"})}})});let ut=null;function dt(){var e;return null!=(e=ut)?e:ut=new Set(["abort","afterprint","animationend","animationiteration","animationstart","appinstalled","audioprocess","audioend","audiostart","beforeprint","beforeunload","beginEvent","blocked","blur","boundary","cached","canplay","canplaythrough","change","chargingchange","chargingtimechange","checking","click","close","complete","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","devicechange","devicelight","devicemotion","deviceorientation","deviceproximity","dischargingtimechange","DOMAttributeNameChanged","DOMAttrModified","DOMCharacterDataModified","DOMContentLoaded","DOMElementNameChanged","focus","focusin","focusout","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","downloading","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","end","ended","endEvent","error","fullscreenchange","fullscreenerror","gamepadconnected","gamepaddisconnected","gotpointercapture","hashchange","lostpointercapture","input","invalid","keydown","keypress","keyup","languagechange","levelchange","load","loadeddata","loadedmetadata","loadend","loadstart","mark","message","messageerror","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","nomatch","notificationclick","noupdate","obsolete","offline","online","open","orientationchange","pagehide","pageshow","paste","pause","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","pointerlockerror","pointermove","pointerout","pointerover","pointerup","play","playing","popstate","progress","push","pushsubscriptionchange","ratechange","readystatechange","repeatEvent","reset","resize","resourcetimingbufferfull","result","resume","scroll","seeked","seeking","select","selectstart","selectionchange","show","soundend","soundstart","speechend","speechstart","stalled","start","storage","submit","success","suspend","SVGAbort","SVGError","SVGLoad","SVGResize","SVGScroll","SVGUnload","SVGZoom","timeout","timeupdate","touchcancel","touchend","touchmove","touchstart","transitionend","unload","updateready","upgradeneeded","userproximity","voiceschanged","versionchange","visibilitychange","volumechange","waiting","wheel"])}var mt=r({name:"no-output-native",meta:{type:"suggestion",docs:{description:"Ensures that output bindings, including aliases, are not named as standard DOM events",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputNative:"Output bindings, including aliases, should not be named as standard DOM events"}},defaultOptions:[],create(e){const t=dt();return{[[ke,Ne,Me].join(",")](r){const[n,a]=ye(r).replace(/\s/g,"").split(":");(t.has(n)||t.has(a))&&e.report({node:r,messageId:"noOutputNative"})}}}}),gt=r({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:'Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.io/guide/styleguide#style-05-16',category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputOnPrefix:'Output bindings, including aliases, should not be named "on", nor prefixed with it (https://angular.io/guide/styleguide#style-05-16)'}},defaultOptions:[],create(e){const t=/^on(([^a-z])|(?=$))/;return{[[ke,Ne,Me].join(",")](r){const[n,a]=ye(r).replace(/\s/g,"").split(":");(t.test(n)||t.test(a))&&e.report({node:r,messageId:"noOutputOnPrefix"})}}}}),ft=r({name:"no-output-rename",meta:{type:"suggestion",docs:{description:"Ensures that output bindings are not aliased",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[],messages:{noOutputRename:"Output bindings should not be aliased (https://angular.io/guide/styleguide#style-05-13)",suggestRemoveAliasName:"Remove alias name",suggestReplaceOriginalNameWithAliasName:"Remove alias name and use it as the original name"}},defaultOptions:[],create(t){let r=new Set;return{[`${be} Property[key.name='selector'] :matches(Literal, TemplateElement)`](e){r=new Set(Te(ye(e)).split(","))},[Ne](n){const a=V(n,N);if(!a||!e.ASTUtils.isIdentifier(a.key))return;const o=ye(n),s=ye(a.key);o===s?t.report({node:n,messageId:"noOutputRename",fix:e=>e.remove(n)}):yt(r,s,o)||t.report({node:n,messageId:"noOutputRename",suggest:[{messageId:"suggestRemoveAliasName",fix:e=>e.remove(n)},{messageId:"suggestReplaceOriginalNameWithAliasName",fix:e=>[e.remove(n),e.replaceText(a.key,o.includes("-")?`'${o}'`:o)]}]})},[ke](e){const[n,a]=Te(ye(e)).split(":");a&&(a===n?t.report({node:e,messageId:"noOutputRename",fix:t=>t.replaceText(e,he(e,n))}):yt(r,n,a)||t.report({node:e,messageId:"noOutputRename",suggest:[["suggestRemoveAliasName",n],["suggestReplaceOriginalNameWithAliasName",a]].map(([t,r])=>({messageId:t,fix:t=>t.replaceText(e,he(e,r))}))}))},"ClassDeclaration:exit"(){r=new Set}}}});function yt(e,t,r){return[...e].some(e=>e===r||function(e,t){return`${e}${Se(t)}`}(e,t)===r)}var ht=r({name:"no-outputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `outputs` metadata property. See more at https://angular.io/styleguide#style-05-12",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputsMetadataProperty:"Use `@Output` rather than the `outputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:e=>({[`${be} Property[key.name="outputs"][computed=false]`](t){e.report({node:t,messageId:"noOutputsMetadataProperty"})}})}),St=r({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle",suggestRemovePipeImpure:"Remove `pure` property"}},defaultOptions:[],create(e){const t=e.getSourceCode();return{[`${Ie} ObjectExpression > Property:matches([key.name='pure'], [key.value='pure']):matches([value.value=false], [value.operator='!'][value.argument.value=true])[computed=false]`](r){e.report({node:r,messageId:"noPipeImpure",suggest:[{messageId:"suggestRemovePipeImpure",fix:e=>X(t,r,e)}]})}}}}),Tt=r({name:"no-queries-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `queries` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noQueriesMetadataProperty:`Use @${y.Output} rather than the \`queries\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[be](t){const r=ie(t,"queries");r&&e.report({node:r.parent,messageId:"noQueriesMetadataProperty"})}})}),xt=r({name:"no-empty-lifecycle-method",meta:{type:"suggestion",docs:{description:"Disallows declaring empty lifecycle methods",category:"Best Practices",recommended:"error",suggestion:!0},schema:[],messages:{noEmptyLifecycleMethod:"Lifecycle methods should not be empty",suggestRemoveLifecycleMethod:"Remove lifecycle method"}},defaultOptions:[],create(e){const t=e.getSourceCode();return{[`ClassDeclaration > ClassBody > MethodDefinition[key.name=${fe([...ne])}][value.body.body.length=0]`](r){G(r.parent.parent)&&e.report({node:r,messageId:"noEmptyLifecycleMethod",suggest:[{messageId:"suggestRemoveLifecycleMethod",fix:e=>{var n;const a=null!=(n=F(r,"@angular/core"))?n:[],o=r.key.name.replace(/^ng+/,"");return[e.remove(r),J(t,r.parent.parent,o,e),W(t,a,o,e)].filter(ue)}}]})}}}});const vt="prefer-on-push-component-change-detection";var bt=r({name:vt,meta:{type:"suggestion",docs:{description:"Enforces component's change detection to ChangeDetectionStrategy.OnPush.",category:"Best Practices",recommended:!1},schema:[],messages:{preferOnPushComponentChangeDetection:"The changeDetection value of a component should be set to ChangeDetectionStrategy.OnPush"}},defaultOptions:[],create:t=>({[Ee](r){const n=ie(r,"changeDetection");n?e.ASTUtils.isIdentifier(n.property)&&"OnPush"===n.property.name||t.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):t.report({node:r,messageId:"preferOnPushComponentChangeDetection"})}})}),Et=r({name:"prefer-output-readonly",meta:{type:"suggestion",docs:{description:"Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{preferOutputReadonly:"Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned",suggestAddReadonlyModifier:"Add `readonly` modifier"}},defaultOptions:[],create:e=>({[`ClassProperty:not([readonly]) > ${De}`]({parent:{key:t}}){e.report({node:t,messageId:"preferOutputReadonly",suggest:[{messageId:"suggestAddReadonlyModifier",fix:e=>e.insertTextBefore(t,"readonly ")}]})}})});const wt=/^\.\.?\/.+/;var It=r({name:"relative-url-prefix",meta:{type:"suggestion",docs:{description:"The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04",category:"Best Practices",recommended:!1},schema:[],messages:{relativeUrlPrefix:"The ./ and ../ prefix is standard syntax for relative URLs. (https://angular.io/styleguide#style-05-04)"}},defaultOptions:[],create:e=>({[`${Ee} Property[key.name='templateUrl']`]({value:t}){Dt(t)&&e.report({node:t,messageId:"relativeUrlPrefix"})},[`${Ee} Property[key.name='styleUrls']`]({value:t}){j(t)&&t.elements.filter(Dt).forEach(t=>{e.report({node:t,messageId:"relativeUrlPrefix"})})}})});function Dt(e){return!K(e)||!wt.test(e.value)}const Pt=["bootstrap","declarations","entryComponents","exports","imports","providers","schemas"];var Ct=r({name:"sort-ngmodule-metadata-arrays",meta:{type:"suggestion",docs:{description:"Enforces ASC alphabetical order for NgModule metadata arrays for easy visual scanning",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{sortNgmoduleMetadataArrays:"NgModule metadata arrays should be sorted in ASC alphabetical order"}},defaultOptions:[],create:t=>({'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(r){Pt.forEach(n=>{const a=ie(r,n);if(!a||!j(a)||a.elements.length<2)return;const o=a.elements.filter(e.ASTUtils.isIdentifier).map((e,t,r)=>[e,r[t+1]]).find(([e,t])=>t&&1===e.name.localeCompare(t.name));if(!o)return;const[s,i]=o;t.report({messageId:"sortNgmoduleMetadataArrays",node:s,fix:e=>[e.replaceText(s,i.name),e.replaceText(i,s.name)]})})}})}),Ot=r({name:"use-component-selector",meta:{type:"suggestion",docs:{description:"Component selector must be declared",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentSelector:"The selector of the component is mandatory"}},defaultOptions:[],create:e=>({[Ee](t){const r=ie(t,"selector");r&&K(r)&&r.value.length||e.report({node:t,messageId:"useComponentSelector"})}})}),At=r({name:"use-component-view-encapsulation",meta:{type:"suggestion",docs:{description:"Disallows using `ViewEncapsulation.None`",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentViewEncapsulation:"Using `ViewEncapsulation.None` makes your styles global, which may have an unintended effect",suggestRemoveViewEncapsulationNone:"Remove `ViewEncapsulation.None`"}},defaultOptions:[],create(e){const t=e.getSourceCode();return{[`${Ee} Property:matches([key.name='encapsulation'], [key.value='encapsulation']) > MemberExpression[object.name='ViewEncapsulation'] > Identifier[name='None']`](r){e.report({node:r,messageId:"useComponentViewEncapsulation",suggest:[{messageId:"suggestRemoveViewEncapsulationNone",fix:e=>{var n;const a=null!=(n=F(r,"@angular/core"))?n:[];return[X(t,r.parent.parent,e),W(t,a,"ViewEncapsulation",e)].filter(ue)}}]})}}}}),kt=r({name:"use-injectable-provided-in",meta:{type:"suggestion",docs:{description:`"Using the 'providedIn' property makes classes decorated with @${d.Injectable} tree shakeable`,category:"Best Practices",recommended:!1},schema:[],messages:{useInjectableProvidedIn:`Classes decorated with @${d.Injectable} should use the 'providedIn' property`}},defaultOptions:[],create:e=>({'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(t){ie(t,"providedIn")||e.report({node:t,messageId:"useInjectableProvidedIn"})}})}),Nt=r({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.io/styleguide#style-09-01",category:"Best Practices",recommended:"warn"},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${fe([...ne])}]`]({key:t,parent:{parent:r}}){if(!G(r))return;const n=te(r),a=t.name,o=(e=>e.slice(2))(a);n.includes(h[o])||e.report({node:t,messageId:"useLifecycleInterface",data:{interfaceName:o,methodName:a}})}})}),Mt=r({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:"Ensures that `Pipes` implement `PipeTransform` interface",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{usePipeTransformInterface:"Pipes should implement `PipeTransform` interface"}},defaultOptions:[],create:e=>({"ClassDeclaration:not(:has(TSClassImplements:matches([expression.name='PipeTransform'], [expression.property.name='PipeTransform']))) > Decorator[expression.callee.name='Pipe']"({parent:t}){var r;e.report({node:null!=(r=t.id)?r:t,messageId:"usePipeTransformInterface",fix:e=>{const{implementsNodeReplace:r,implementsTextReplace:n}=function({id:e,implements:t},r){const[n,a]=t?[Y(t),`, ${r}`]:[e,` implements ${r}`];return{implementsNodeReplace:n,implementsTextReplace:a}}(t,"PipeTransform");return[H(t,"@angular/core","PipeTransform",e),e.insertTextAfter(r,n)].filter(ue)}})}})}),jt=r({name:"pipe-prefix",meta:{type:"suggestion",docs:{description:"Enforce consistent prefix for pipes.",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"},minimum:1,uniqueItems:!0}},additionalProperties:!1}],messages:{pipePrefix:"@Pipes should be prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[Ie](r){const n=ie(r,"name");if(!n)return;if(!function(e){return Array.isArray(e)&&e.length>0}(t))return;const a=t.join("|"),o=de.prefix(a,"camelCase");let s;K(n)?s=n.value:$(n)&&n.quasis[0]&&(s=n.quasis[0].value.raw),s&&(o.apply(this,[s])||e.report({node:n,messageId:"pipePrefix",data:{prefixes:ge(t)}}))}})});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/component-max-inline-declarations":"error","@angular-eslint/component-selector":"error","@angular-eslint/contextual-decorator":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":"error","@angular-eslint/no-attribute-decorator":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-forward-ref":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-prefix":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-lifecycle-call":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/no-pipe-impure":"error","@angular-eslint/no-queries-metadata-property":"error","@angular-eslint/pipe-prefix":"error","@angular-eslint/prefer-on-push-component-change-detection":"error","@angular-eslint/prefer-output-readonly":"error","@angular-eslint/relative-url-prefix":"error","@angular-eslint/sort-ngmodule-metadata-arrays":"error","@angular-eslint/use-component-selector":"error","@angular-eslint/use-component-view-encapsulation":"error","@angular-eslint/use-injectable-provided-in":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error"}},base:{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module",project:"./tsconfig.json"},plugins:["@typescript-eslint","@angular-eslint"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"warn","@angular-eslint/use-pipe-transform-interface":"error"}},"recommended--extra":{extends:"./configs/base.json",rules:{"no-restricted-imports":["error",{paths:[{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}]}],"@typescript-eslint/member-ordering":["error",{default:["static-field","instance-field","static-method","instance-method"]}],"no-restricted-syntax":["error",{selector:'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',message:"Unexpected property on console object was called"}],"@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-non-null-assertion":"error","no-fallthrough":"error"}},"ng-cli-compat":{extends:["./configs/base.json"],env:{browser:!0,es6:!0,node:!0},plugins:["eslint-plugin-import","eslint-plugin-jsdoc","eslint-plugin-prefer-arrow"],rules:{"@typescript-eslint/interface-name-prefix":"off","@typescript-eslint/explicit-member-accessibility":"off","sort-keys":"off","@angular-eslint/component-class-suffix":"error","@angular-eslint/component-selector":["error",{type:"element",prefix:"app",style:"kebab-case"}],"@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":["error",{type:"attribute",prefix:"app",style:"camelCase"}],"@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"off","@typescript-eslint/ban-types":["error",{types:{Object:{message:"Avoid using the `Object` type. Did you mean `object`?"},Function:{message:"Avoid using the `Function` type. Prefer a specific function type, like `() => void`."},Boolean:{message:"Avoid using the `Boolean` type. Did you mean `boolean`?"},Number:{message:"Avoid using the `Number` type. Did you mean `number`?"},String:{message:"Avoid using the `String` type. Did you mean `string`?"},Symbol:{message:"Avoid using the `Symbol` type. Did you mean `symbol`?"}}}],"@typescript-eslint/consistent-type-assertions":"error","@typescript-eslint/dot-notation":"error","@typescript-eslint/member-ordering":"error","@typescript-eslint/naming-convention":"error","@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-parameter-properties":"off","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":["error",{path:"always",types:"prefer-import",lib:"always"}],"@typescript-eslint/unified-signatures":"error",complexity:"off","constructor-super":"error",eqeqeq:["error","smart"],"guard-for-in":"error","id-blacklist":["error","any","Number","number","String","string","Boolean","boolean","Undefined","undefined"],"id-match":"error","import/no-deprecated":"warn","jsdoc/newline-after-description":"error","jsdoc/no-types":"error","max-classes-per-file":"off","no-bitwise":"error","no-caller":"error","no-cond-assign":"error","no-console":["error",{allow:["log","warn","dir","timeLog","assert","clear","count","countReset","group","groupEnd","table","dirxml","error","groupCollapsed","Console","profile","profileEnd","timeStamp","context"]}],"no-debugger":"error","no-empty":"off","no-eval":"error","no-fallthrough":"error","no-invalid-this":"off","no-new-wrappers":"error","no-restricted-imports":["error",{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}],"@typescript-eslint/no-shadow":["error",{hoist:"all"}],"no-throw-literal":"error","no-undef-init":"error","no-underscore-dangle":"error","no-unsafe-finally":"error","no-unused-labels":"error","no-var":"error","object-shorthand":"error","one-var":["error","never"],"prefer-arrow/prefer-arrow-functions":"error","prefer-const":"error",radix:"error","use-isnan":"error","valid-typeof":"off"}},"ng-cli-compat--formatting-add-on":{plugins:["eslint-plugin-jsdoc"],rules:{"arrow-body-style":"error","arrow-parens":"off","comma-dangle":"off",curly:"error","eol-last":"error","jsdoc/check-alignment":"error","max-len":["error",{code:140}],"new-parens":"error","no-multiple-empty-lines":"off","no-trailing-spaces":"error","quote-props":["error","as-needed"],"space-before-function-paren":["error",{anonymous:"never",asyncArrow:"always",named:"never"}],"@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1}}],quotes:"off","@typescript-eslint/quotes":["error","single",{allowTemplateLiterals:!0}],"@typescript-eslint/semi":["error","always"],"@typescript-eslint/type-annotation-spacing":"error"}}},rules:{"contextual-decorator":xe,"component-class-suffix":je,"component-max-inline-declarations":Be,"component-selector":qe,"contextual-lifecycle":Ye,"directive-class-suffix":He,"directive-selector":We,"no-attribute-decorator":ze,"no-conflicting-lifecycle":Ze,"no-forward-ref":et,"no-host-metadata-property":rt,"no-input-prefix":at,"no-input-rename":it,"no-inputs-metadata-property":ct,"no-lifecycle-call":pt,"no-output-native":mt,"no-output-on-prefix":gt,"no-output-rename":ft,"no-outputs-metadata-property":ht,"no-pipe-impure":St,"no-queries-metadata-property":Tt,"no-empty-lifecycle-method":xt,[vt]:bt,"prefer-output-readonly":Et,"relative-url-prefix":It,"sort-ngmodule-metadata-arrays":Ct,"use-component-selector":Ot,"use-component-view-encapsulation":At,"use-injectable-provided-in":kt,"use-lifecycle-interface":Nt,"use-pipe-transform-interface":Mt,"pipe-prefix":jt}};
1
+ var e=require("@typescript-eslint/experimental-utils"),t=require("@angular/compiler");const r=e.ESLintUtils.RuleCreator(e=>"https://github.com/angular-eslint/angular-eslint");function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var s=o(function(e,t){var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,(r=t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})).ArrayExpression="ArrayExpression",r.ArrayPattern="ArrayPattern",r.ArrowFunctionExpression="ArrowFunctionExpression",r.AssignmentExpression="AssignmentExpression",r.AssignmentPattern="AssignmentPattern",r.AwaitExpression="AwaitExpression",r.BinaryExpression="BinaryExpression",r.BlockStatement="BlockStatement",r.BreakStatement="BreakStatement",r.CallExpression="CallExpression",r.CatchClause="CatchClause",r.ChainExpression="ChainExpression",r.ClassBody="ClassBody",r.ClassDeclaration="ClassDeclaration",r.ClassExpression="ClassExpression",r.ClassProperty="ClassProperty",r.ConditionalExpression="ConditionalExpression",r.ContinueStatement="ContinueStatement",r.DebuggerStatement="DebuggerStatement",r.Decorator="Decorator",r.DoWhileStatement="DoWhileStatement",r.EmptyStatement="EmptyStatement",r.ExportAllDeclaration="ExportAllDeclaration",r.ExportDefaultDeclaration="ExportDefaultDeclaration",r.ExportNamedDeclaration="ExportNamedDeclaration",r.ExportSpecifier="ExportSpecifier",r.ExpressionStatement="ExpressionStatement",r.ForInStatement="ForInStatement",r.ForOfStatement="ForOfStatement",r.ForStatement="ForStatement",r.FunctionDeclaration="FunctionDeclaration",r.FunctionExpression="FunctionExpression",r.Identifier="Identifier",r.IfStatement="IfStatement",r.ImportDeclaration="ImportDeclaration",r.ImportDefaultSpecifier="ImportDefaultSpecifier",r.ImportExpression="ImportExpression",r.ImportNamespaceSpecifier="ImportNamespaceSpecifier",r.ImportSpecifier="ImportSpecifier",r.JSXAttribute="JSXAttribute",r.JSXClosingElement="JSXClosingElement",r.JSXClosingFragment="JSXClosingFragment",r.JSXElement="JSXElement",r.JSXEmptyExpression="JSXEmptyExpression",r.JSXExpressionContainer="JSXExpressionContainer",r.JSXFragment="JSXFragment",r.JSXIdentifier="JSXIdentifier",r.JSXMemberExpression="JSXMemberExpression",r.JSXNamespacedName="JSXNamespacedName",r.JSXOpeningElement="JSXOpeningElement",r.JSXOpeningFragment="JSXOpeningFragment",r.JSXSpreadAttribute="JSXSpreadAttribute",r.JSXSpreadChild="JSXSpreadChild",r.JSXText="JSXText",r.LabeledStatement="LabeledStatement",r.Literal="Literal",r.LogicalExpression="LogicalExpression",r.MemberExpression="MemberExpression",r.MetaProperty="MetaProperty",r.MethodDefinition="MethodDefinition",r.NewExpression="NewExpression",r.ObjectExpression="ObjectExpression",r.ObjectPattern="ObjectPattern",r.Program="Program",r.Property="Property",r.RestElement="RestElement",r.ReturnStatement="ReturnStatement",r.SequenceExpression="SequenceExpression",r.SpreadElement="SpreadElement",r.Super="Super",r.SwitchCase="SwitchCase",r.SwitchStatement="SwitchStatement",r.TaggedTemplateExpression="TaggedTemplateExpression",r.TemplateElement="TemplateElement",r.TemplateLiteral="TemplateLiteral",r.ThisExpression="ThisExpression",r.ThrowStatement="ThrowStatement",r.TryStatement="TryStatement",r.UnaryExpression="UnaryExpression",r.UpdateExpression="UpdateExpression",r.VariableDeclaration="VariableDeclaration",r.VariableDeclarator="VariableDeclarator",r.WhileStatement="WhileStatement",r.WithStatement="WithStatement",r.YieldExpression="YieldExpression",r.TSAbstractClassProperty="TSAbstractClassProperty",r.TSAbstractKeyword="TSAbstractKeyword",r.TSAbstractMethodDefinition="TSAbstractMethodDefinition",r.TSAnyKeyword="TSAnyKeyword",r.TSArrayType="TSArrayType",r.TSAsExpression="TSAsExpression",r.TSAsyncKeyword="TSAsyncKeyword",r.TSBigIntKeyword="TSBigIntKeyword",r.TSBooleanKeyword="TSBooleanKeyword",r.TSCallSignatureDeclaration="TSCallSignatureDeclaration",r.TSClassImplements="TSClassImplements",r.TSConditionalType="TSConditionalType",r.TSConstructorType="TSConstructorType",r.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",r.TSDeclareFunction="TSDeclareFunction",r.TSDeclareKeyword="TSDeclareKeyword",r.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",r.TSEnumDeclaration="TSEnumDeclaration",r.TSEnumMember="TSEnumMember",r.TSExportAssignment="TSExportAssignment",r.TSExportKeyword="TSExportKeyword",r.TSExternalModuleReference="TSExternalModuleReference",r.TSFunctionType="TSFunctionType",r.TSImportEqualsDeclaration="TSImportEqualsDeclaration",r.TSImportType="TSImportType",r.TSIndexedAccessType="TSIndexedAccessType",r.TSIndexSignature="TSIndexSignature",r.TSInferType="TSInferType",r.TSInterfaceBody="TSInterfaceBody",r.TSInterfaceDeclaration="TSInterfaceDeclaration",r.TSInterfaceHeritage="TSInterfaceHeritage",r.TSIntersectionType="TSIntersectionType",r.TSIntrinsicKeyword="TSIntrinsicKeyword",r.TSLiteralType="TSLiteralType",r.TSMappedType="TSMappedType",r.TSMethodSignature="TSMethodSignature",r.TSModuleBlock="TSModuleBlock",r.TSModuleDeclaration="TSModuleDeclaration",r.TSNamedTupleMember="TSNamedTupleMember",r.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",r.TSNeverKeyword="TSNeverKeyword",r.TSNonNullExpression="TSNonNullExpression",r.TSNullKeyword="TSNullKeyword",r.TSNumberKeyword="TSNumberKeyword",r.TSObjectKeyword="TSObjectKeyword",r.TSOptionalType="TSOptionalType",r.TSParameterProperty="TSParameterProperty",r.TSParenthesizedType="TSParenthesizedType",r.TSPrivateKeyword="TSPrivateKeyword",r.TSPropertySignature="TSPropertySignature",r.TSProtectedKeyword="TSProtectedKeyword",r.TSPublicKeyword="TSPublicKeyword",r.TSQualifiedName="TSQualifiedName",r.TSReadonlyKeyword="TSReadonlyKeyword",r.TSRestType="TSRestType",r.TSStaticKeyword="TSStaticKeyword",r.TSStringKeyword="TSStringKeyword",r.TSSymbolKeyword="TSSymbolKeyword",r.TSTemplateLiteralType="TSTemplateLiteralType",r.TSThisType="TSThisType",r.TSTupleType="TSTupleType",r.TSTypeAliasDeclaration="TSTypeAliasDeclaration",r.TSTypeAnnotation="TSTypeAnnotation",r.TSTypeAssertion="TSTypeAssertion",r.TSTypeLiteral="TSTypeLiteral",r.TSTypeOperator="TSTypeOperator",r.TSTypeParameter="TSTypeParameter",r.TSTypeParameterDeclaration="TSTypeParameterDeclaration",r.TSTypeParameterInstantiation="TSTypeParameterInstantiation",r.TSTypePredicate="TSTypePredicate",r.TSTypeQuery="TSTypeQuery",r.TSTypeReference="TSTypeReference",r.TSUndefinedKeyword="TSUndefinedKeyword",r.TSUnionType="TSUnionType",r.TSUnknownKeyword="TSUnknownKeyword",r.TSVoidKeyword="TSVoidKeyword",(n=t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={})).Boolean="Boolean",n.Identifier="Identifier",n.JSXIdentifier="JSXIdentifier",n.JSXText="JSXText",n.Keyword="Keyword",n.Null="Null",n.Numeric="Numeric",n.Punctuator="Punctuator",n.RegularExpression="RegularExpression",n.String="String",n.Template="Template",n.Block="Block",n.Line="Line"});Object.defineProperty(exports,"__esModule",{value:!0});var i={__proto__:null};Object.defineProperty(exports,"__esModule",{value:!0});var l={__proto__:null},c=o(function(e,t){var r=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=a&&a.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=a&&a.__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)&&r(t,e,a);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=void 0,t.TSESTree=o(s)}),p=o(function(e,t){var r=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=a&&a.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};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 s.AST_NODE_TYPES}});var o=s;Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return o.AST_TOKEN_TYPES}}),n(i,t),n(l,t),n(c,t)});const u=Object.keys;var d,m,g,f;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(d||(d={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(m||(m={})),function(e){e.HostListener="HostListener"}(g||(g={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(f||(f={}));const y=n({},m,g,f);var h,S;!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.DoBootstrap="DoBootstrap",e.DoCheck="DoCheck",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit"}(h||(h={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngDoBootstrap="ngDoBootstrap",e.ngDoCheck="ngDoCheck",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit"}(S||(S={}));const T="camelCase",x="kebab-case",v=u(d),b=u(y),E=u(h),w=u(S),I=new Map([[d.Component,new Set([S.ngAfterContentChecked,S.ngAfterContentInit,S.ngAfterViewChecked,S.ngAfterViewInit,S.ngOnChanges,S.ngOnDestroy,S.ngOnInit,S.ngDoCheck])],[d.Directive,new Set([S.ngAfterContentChecked,S.ngAfterContentInit,S.ngAfterViewChecked,S.ngAfterViewInit,S.ngOnChanges,S.ngOnDestroy,S.ngOnInit,S.ngDoCheck])],[d.Injectable,new Set([S.ngOnDestroy])],[d.NgModule,new Set([S.ngDoBootstrap])],[d.Pipe,new Set([S.ngOnDestroy])]]),D=new Set(b),C=new Set(v),P=new Map([[d.Component,D],[d.Directive,D],[d.Injectable,new Set([y.Host,y.Inject,y.Optional,y.Self,y.SkipSelf])],[d.NgModule,new Set([y.Host,y.Inject,y.Optional,y.Self,y.SkipSelf])],[d.Pipe,new Set([y.Host,y.Inject,y.Optional,y.Self,y.SkipSelf])]]);function O(e){return e.type===p.AST_NODE_TYPES.CallExpression}function A(e){return e.type===p.AST_NODE_TYPES.MemberExpression}function N(e){return e.type===p.AST_NODE_TYPES.ClassDeclaration}function k(e){return function(e){return e.type===p.AST_NODE_TYPES.ClassProperty}(e)||U(e)}function M(e){return e.type===p.AST_NODE_TYPES.ObjectExpression}function j(e){return e.type===p.AST_NODE_TYPES.ArrayExpression}function _(e){return e.type===p.AST_NODE_TYPES.Property}function R(e){return e.type===p.AST_NODE_TYPES.Program}function B(e){return e.type===p.AST_NODE_TYPES.Literal}function $(e){return e.type===p.AST_NODE_TYPES.TemplateLiteral}function L(e){return e.type===p.AST_NODE_TYPES.ImportDeclaration}function K(e){return B(e)&&"string"==typeof e.value}function U(e){return e.type===p.AST_NODE_TYPES.MethodDefinition}function V({parent:e},t){for(;e&&!R(e);){if(t(e))return e;e=e.parent}return null}function F(e,t){let r=e;for(;r=r.parent;)if(R(r))return r.body.filter(e=>L(e)&&e.source.value===t);return r}function J(t,r,n,a){const{implements:o}=r;if(!o)return;const s=o.map(({expression:e})=>e).filter(e.ASTUtils.isIdentifier).find(({name:e})=>e===n);if(!s)return;const i=o[0].expression===s;if(i&&o[o.length-1].expression===s&&r.id)return a.removeRange([r.id.range[1],o[0].range[1]]);const l=t.getTokenAfter(s);if(i&&l)return a.removeRange([s.range[0],l.range[1]]);const c=t.getTokenBefore(s);return c?a.removeRange([c.range[0],s.range[1]]):void 0}function X(t,r,n){const a=t.getTokenAfter(r);return a&&e.ASTUtils.isCommaToken(a)?n.removeRange([r.range[0],a.range[1]]):n.remove(r)}function q(e,t){for(const r of e){const e=r.specifiers.find(e=>e.type===p.AST_NODE_TYPES.ImportSpecifier&&e.imported.name===t);if(e)return{importDeclaration:r,importSpecifier:e}}}function Y(e){return e.slice(-1)[0]}function H(e,t,r,n){const a=F(e,t);if(null==a||!a.length)return n.insertTextAfterRange([0,0],`import { ${r} } from '${t}';\n`);if(q(a,r))return;const o=Y(a[0].specifiers);return n.insertTextAfter(o,`, ${r}`)}function W(e,t,r,n){var a;const{importDeclaration:o,importSpecifier:s}=null!=(a=q(t,r))?a:{};if(!o||!s)return;const i=o.specifiers[0]===s;if(i&&o.specifiers[o.specifiers.length-1]===s)return n.remove(o);const l=e.getTokenAfter(s);if(i&&l)return n.removeRange([s.range[0],l.range[1]]);const c=e.getTokenBefore(s);return c?n.removeRange([c.range[0],s.range[1]]):void 0}const z=e=>{var t;return N(e)?null==(t=e.id)?void 0:t.name:e.parent?z(e.parent):void 0},G=({decorators:e})=>null==e?void 0:e.map(Q).filter(ue).find(se),Q=({expression:t})=>e.ASTUtils.isIdentifier(t)?t.name:O(t)&&e.ASTUtils.isIdentifier(t.callee)?t.callee.name:void 0,Z=e=>{var t;return null!=(t=e.implements)?t:[]},ee=t=>Z(t).map(({expression:e})=>A(e)?e.property:e).filter(e.ASTUtils.isIdentifier).map(({name:e})=>e),te=e=>ee(e).filter(ae),re=new Set(E),ne=new Set(w),ae=e=>re.has(e),oe=e=>ne.has(e),se=e=>C.has(e),ie=(t,r)=>{var n;return null==(n=((t,r)=>{var n;return null==(n=(({expression:e})=>{if(!O(e)||0===e.arguments.length)return;const[t]=e.arguments;return M(t)&&t.properties?t:void 0})(t))?void 0:n.properties.filter(_).find(({key:t})=>e.ASTUtils.isIdentifier(t)&&t.name===r)})(t,r))?void 0:n.value},le=({body:{body:e}})=>e.filter(U),ce=t=>K(t.key)?t.key.value:e.ASTUtils.isIdentifier(t.key)?t.key.name:void 0;function pe(e){return Array.isArray(e)?e:e?[e]:[]}const ue=e=>null!=e,de={attribute:e=>0!==e.length,camelCase:e=>/^[a-zA-Z0-9[\]]+$/.test(e),element:e=>null!==e,kebabCase:e=>/^[a-z0-9-]+-[a-z0-9-]+$/.test(e),prefix(e,t){const r=new RegExp(`^\\[?(${e})`);return n=>{if(!e)return!0;if(!r.test(n))return!1;const a=n.replace(r,"");if(t===T)return!a||a[0]===a[0].toUpperCase();if(t===x)return!a||"-"===a[0];throw Error("Invalid selector style!")}}},me=e=>e.replace(/-[a-zA-Z]/g,({1:e})=>e.toUpperCase()),ge=e=>{const t=e.length;return 1===t?`"${e[0]}"`:`${e.map(e=>`"${e}"`).slice(0,t-1).join(", ")} or "${[...e].pop()}"`},fe=e=>RegExp(`^(${e.join("|")})$`);function ye(t){return e.ASTUtils.isIdentifier(t)?t.name:B(t)?String(t.value):($(t)?t.quasis[0]:t).value.raw}function he(e,t){return B(e)?`'${t}'`:`\`${t}\``}function Se(e){return`${e[0].toUpperCase()}${e.slice(1)}`}function Te(e){return e.replace(/[[\]\s]/g,"")}var xe=r({name:"contextual-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes use contextual decorators in its body",category:"Best Practices",recommended:!1},schema:[],messages:{contextualDecorator:'Decorator out of context for "@{{classDecoratorName}}()"'}},defaultOptions:[],create:e=>({"MethodDefinition[kind=/^(get|set|method)$/], ClassProperty, TSParameterProperty"(t){!function(e,t){var r;if(null==(r=t.decorators)||!r.length)return;const n=V(t,N);if(!n)return;const a=G(n);if(a)for(const r of t.decorators)ve(e,r,a)}(e,t)}})});function ve(e,t,r){const n=Q(t);if(!n||!D.has(n))return;const a=P.get(r);null!=a&&a.has(n)||e.report({node:t,messageId:"contextualDecorator",data:{classDecoratorName:r}})}const be="ClassDeclaration > Decorator[expression.callee.name=/^(Component|Directive)$/]",Ee='ClassDeclaration > Decorator[expression.callee.name="Component"]',we='ClassDeclaration > Decorator[expression.callee.name="Directive"]',Ie='ClassDeclaration > Decorator[expression.callee.name="Pipe"]',De='Decorator[expression.callee.name="Output"]';function Ce(e){return`Property:matches([key.name='${e}'][computed=false], [key.value='${e}'], [key.quasis.0.value.raw='${e}'])`}const Pe=`:matches(${Ee} ${Ce("selector")} :matches(Literal, TemplateElement), ${we} ${Ce("selector")} :matches(Literal, TemplateElement))`,Oe=`${be} ${Ce("inputs")} > ArrayExpression :matches(Literal, TemplateElement)`,Ae=":matches(ClassProperty, MethodDefinition[kind='set']) Decorator[expression.callee.name=\"Input\"] :matches(Literal, TemplateElement)",Ne=":matches(ClassProperty, MethodDefinition[kind='set'])[computed=false]:has(Decorator[expression.callee.name=\"Input\"]) > :matches(Identifier, Literal)",ke=`${be} ${Ce("outputs")} > ArrayExpression :matches(Literal, TemplateElement)`,Me=`:matches(ClassProperty, MethodDefinition[kind='get']) ${De} :matches(Literal, TemplateElement)`,je=`:matches(ClassProperty, MethodDefinition[kind='get'])[computed=false]:has(${De}) > :matches(Identifier, Literal)`;var _e=r({name:"component-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"Component class names should end with one of these suffixes: {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create:(e,[{suffixes:t}])=>({[Ee](r){const n=r.parent,a=z(n);a&&t.some(e=>a.endsWith(e))||e.report({node:n.id?n.id:n,messageId:"componentClassSuffix",data:{suffixes:ge(t)}})}})});const Re=/\r\n|\r|\n/;function Be(e){return $(e)?e.quasis[0].value.raw.trim().split(Re).length:B(e)?e.raw.trim().split(Re).length:0}var $e=r({name:"component-max-inline-declarations",meta:{type:"suggestion",docs:{description:"Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.io/guide/styleguide#style-05-04",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{template:{minimum:0,type:"number"},styles:{minimum:0,type:"number"},animations:{minimum:0,type:"number"}},additionalProperties:!1}],messages:{componentMaxInlineDeclarations:"`{{propertyType}}` has too many lines ({{lineCount}}). Maximum allowed is {{max}} (https://angular.io/guide/styleguide#style-05-04)"}},defaultOptions:[{template:3,styles:3,animations:15}],create:(e,[{template:t=3,styles:r=3,animations:n=15}])=>({[`${Ee} Property[key.name='template']`]({value:r}){const n=Be(r);n<=t||e.report({node:r,messageId:"componentMaxInlineDeclarations",data:{lineCount:n,max:t,propertyType:"template"}})},[`${Ee} Property[key.name='styles']`]({value:t}){if(!j(t))return;const n=t.elements.reduce((e,t)=>e+Be(t),0);n<=r||e.report({node:t,messageId:"componentMaxInlineDeclarations",data:{lineCount:n,max:r,propertyType:"styles"}})},[`${Ee} Property[key.name='animations']`]({value:t}){if(!j(t)||0===t.elements.length)return;const r=Math.max(t.loc.end.line-t.loc.start.line-2,1);r<=n||e.report({node:t,messageId:"componentMaxInlineDeclarations",data:{lineCount:r,max:n,propertyType:"animations"}})}})});const Le="attribute",Ke="element",Ue={[Le]:"attrs",[Ke]:Ke},Ve=(e,t,r)=>{r.report({node:e,messageId:"prefixFailure",data:{prefix:ge(pe(t))}})},Fe=(e,t,r)=>{r.report({node:e,messageId:"styleFailure",data:{style:t}})},Je=(e,t,r)=>{r.report({node:e,messageId:"typeFailure",data:{type:t}})},Xe=(e,t,r)=>{const n=pe(e),a=r,o=n.length>0&&n.every(e=>-1!==[Ke,Le].indexOf(e)),s=t.length>0,i=-1!==[T,x].indexOf(a);return o&&s&&i},qe=(e,r,n,a)=>{const o=pe(r||["attrs",Ke]).reduce((e,t)=>e.concat(Ue[t]),[]),s=a===x?de.kebabCase:de.camelCase;let i=null;if(e&&B(e)?i=t.CssSelector.parse(e.raw):e&&$(e)&&e.quasis[0]&&(i=t.CssSelector.parse(e.quasis[0].value.raw)),!i)return null;const l=((e,t)=>e.reduce((e,r)=>{const n=t.reduce((e,t)=>{const n=r[t];return n?e.concat(n):e},[]);return e.concat(n)},[]))(i,o),c=l.some(e=>n.some(t=>de.prefix(t,a)(e))),p=l.some(e=>s(e));return{hasExpectedPrefix:c,hasExpectedType:l.length>0,hasExpectedStyle:p}};var Ye=r({name:"component-selector",meta:{type:"suggestion",docs:{description:"Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02\n and https://angular.io/guide/styleguide#style-05-03.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Ke,Le]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[T,x]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should start with one of these prefixes: {{prefix}} (https://angular.io/guide/styleguide#style-02-07)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-05-02)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-05-03)",shadowDomEncapsulatedStyleFailure:`The selector of a ShadowDom-encapsulated component should be \`${x}\` (https://github.com/angular-eslint/angular-eslint/issues/534)`}},defaultOptions:[{type:"",prefix:"",style:""}],create:(t,[{type:r,prefix:n,style:a}])=>({[Ee](o){const s=ie(o,"selector");if(!s)return;if(!Xe(r,n,a))return;const i=a!==x&&function(t){const r=ie(t,"encapsulation");return r&&A(r)&&e.ASTUtils.isIdentifier(r.object)&&"ViewEncapsulation"===r.object.name&&e.ASTUtils.isIdentifier(r.property)&&"ShadowDom"===r.property.name}(o)?x:a,l=qe(s,r,pe(n),i);null!==l&&(l.hasExpectedType?l.hasExpectedStyle?l.hasExpectedPrefix||Ve(s,n,t):a===i?Fe(s,a,t):t.report({node:s,messageId:"shadowDomEncapsulatedStyleFailure"}):Je(s,r,t))}})}),He=r({name:"contextual-lifecycle",meta:{type:"problem",docs:{description:"Ensures that lifecycle methods are used in a correct context",category:"Possible Errors",recommended:"error"},schema:[],messages:{contextualLifecycle:"Angular will not invoke the `{{methodName}}` lifecycle method within `@{{classDecoratorName}}()` classes"}},defaultOptions:[],create(e){function t({parent:t},r){const n=t,a=I.get(r),o=le(n);for(const t of o){const n=ce(t);!n||!oe(n)||null!=a&&a.has(n)||e.report({node:t.key,messageId:"contextualLifecycle",data:{classDecoratorName:r,methodName:n}})}}return{[Ee](e){t(e,d.Component)},[we](e){t(e,d.Directive)},'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(e){t(e,d.Injectable)},'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(e){t(e,d.NgModule)},[Ie](e){t(e,d.Pipe)}}}}),We=r({name:"directive-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{directiveClassSuffix:"Directive class names should end with one of these suffixes: {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Directive"]}],create:(e,[{suffixes:t}])=>({[we](r){if(!ie(r,"selector"))return;const n=r.parent,a=z(n),o=ee(n).some(e=>e.endsWith("Validator")),s=t.concat(o?"Validator":[]);var i;a&&s.some(e=>a.endsWith(e))||e.report({node:null!=(i=n.id)?i:n,messageId:"directiveClassSuffix",data:{suffixes:ge(s)}})}})}),ze=r({name:"directive-selector",meta:{type:"suggestion",docs:{description:"Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Ke,Le]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[T,x]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should start with one of these prefixes: {{prefix}} (https://angular.io/guide/styleguide#style-02-08)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-02-06)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-02-06)"}},defaultOptions:[{type:"",prefix:"",style:""}],create:(e,[{type:t,prefix:r,style:n}])=>({[we](a){const o=ie(a,"selector");if(!o)return;if(!Xe(t,r,n))return;const s=qe(o,t,pe(r),n);null!==s&&(s.hasExpectedType?s.hasExpectedStyle?s.hasExpectedPrefix||Ve(o,r,e):Fe(o,n,e):Je(o,t,e))}})}),Ge=r({name:"no-attribute-decorator",meta:{type:"problem",docs:{description:"Disallows usage of @Attribute decorator.",category:"Possible Errors",recommended:!1},schema:[],messages:{noAttributeDecorator:"The usage of @Attribute is considered a bad practice. Use @Input instead"}},defaultOptions:[],create:e=>({'ClassDeclaration MethodDefinition[key.name="constructor"] Decorator[expression.callee.name="Attribute"]'(t){e.report({node:t,messageId:"noAttributeDecorator"})}})});const Qe=[h.DoCheck,h.OnChanges],Ze=[S.ngDoCheck,S.ngOnChanges];var et=r({name:"no-conflicting-lifecycle",meta:{type:"suggestion",docs:{description:"Ensures that directives not implement conflicting lifecycle interfaces.",category:"Best Practices",recommended:"error"},schema:[],messages:{noConflictingLifecycleInterface:`Implementing ${h.DoCheck} and ${h.OnChanges} in a class is not recommended`,noConflictingLifecycleMethod:`Declaring ${S.ngDoCheck} and ${S.ngOnChanges} method in a class is not recommended`}},defaultOptions:[],create:t=>({ClassDeclaration(r){(r=>{const n=te(r);if(!Qe.every(e=>n.includes(e)))return;const a=Z(r).filter(t=>e.ASTUtils.isIdentifier(t.expression)&&ae(t.expression.name));for(const e of a)t.report({node:e,messageId:"noConflictingLifecycleInterface"})})(r),(r=>{const n=(e=>le(e).map(ce).filter(ue).filter(oe))(r);if(!Ze.every(e=>n.includes(e)))return;const a=le(r).filter(t=>e.ASTUtils.isIdentifier(t.key)&&oe(t.key.name));for(const e of a)t.report({node:e,messageId:"noConflictingLifecycleMethod"})})(r)}})}),tt=r({name:"no-forward-ref",meta:{type:"suggestion",docs:{description:"Disallows usage of `forwardRef` references for DI",category:"Best Practices",recommended:!1},schema:[],messages:{noForwardRef:"Avoid using `forwardRef`"}},defaultOptions:[],create:e=>({'CallExpression[callee.type="Identifier"][callee.name="forwardRef"]'(t){e.report({node:t,messageId:"noForwardRef"})}})});const rt={allowStatic:!1};var nt=r({name:"no-host-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `host` metadata property. See more at https://angular.io/styleguide#style-06-03",category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{allowStatic:{type:"boolean",default:rt.allowStatic}},additionalProperties:!1}],messages:{noHostMetadataProperty:`Use @${y.HostBinding} or @${y.HostListener} rather than the \`host\` metadata property (https://angular.io/styleguide#style-06-03)`}},defaultOptions:[rt],create:(e,[{allowStatic:t}])=>({[`${be} Property[key.name="host"]`](r){(t&&M(r.value)?r.value.properties.filter(at):[r]).forEach(t=>{e.report({node:t,messageId:"noHostMetadataProperty"})})}})});function at(t){return _(t)&&!function(t){return!t.computed&&(e.ASTUtils.isIdentifier(t.key)||K(t.key)&&function({0:e}){return e.toLowerCase()!==e.toUpperCase()}(t.key.value))}(t)&&!function(e){return K(e.value)&&""===e.value.value}(t)}var ot=r({name:"no-input-prefix",meta:{type:"suggestion",docs:{description:"Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{noInputPrefix:"Input bindings, including aliases, should not be named, nor prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[[Oe,Ae,Ne].join(",")](r){const[n,a]=ye(r).replace(/\s/g,"").split(":");t.some(e=>function(e,t,r){const n=RegExp(`^${e}(([^a-z])|(?=$))`);return n.test(t)||n.test(r)}(e,n,a))&&e.report({node:r,messageId:"noInputPrefix",data:{prefixes:ge(t)}})}})});let st=null;function it(){var e;return null!=(e=st)?e:st=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-dragged","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"])}var lt=r({name:"no-input-rename",meta:{type:"suggestion",docs:{description:"Ensures that input bindings are not aliased",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[{type:"object",properties:{allowedNames:{type:"array",items:{type:"string"},description:"A list with allowed input names",uniqueItems:!0}},additionalProperties:!1}],messages:{noInputRename:"Input bindings should not be aliased (https://angular.io/guide/styleguide#style-05-13)",suggestRemoveAliasName:"Remove alias name",suggestReplaceOriginalNameWithAliasName:"Remove alias name and use it as the original name"}},defaultOptions:[{allowedNames:[]}],create(t,[{allowedNames:r=[]}]){let n=new Set;const a=it();return{[Pe](e){n=new Set(Te(ye(e)).split(","))},[Ae](o){const s=V(o,k);if(!s||!e.ASTUtils.isIdentifier(s.key))return;const i=ye(o),l=ye(s.key);r.includes(i)||a.has(i)&&l===me(i)||(i===l?t.report({node:o,messageId:"noInputRename",fix:e=>e.remove(o)}):ct(n,l,i)||t.report({node:o,messageId:"noInputRename",suggest:[{messageId:"suggestRemoveAliasName",fix:e=>e.remove(o)},{messageId:"suggestReplaceOriginalNameWithAliasName",fix:e=>[e.remove(o),e.replaceText(s.key,i.includes("-")?`'${i}'`:i)]}]}))},[Oe](e){const[o,s]=Te(ye(e)).split(":");!s||r.includes(s)||a.has(s)&&o===me(s)||(s===o?t.report({node:e,messageId:"noInputRename",fix:t=>t.replaceText(e,he(e,o))}):ct(n,o,s)||t.report({node:e,messageId:"noInputRename",suggest:[["suggestRemoveAliasName",o],["suggestReplaceOriginalNameWithAliasName",s]].map(([t,r])=>({messageId:t,fix:t=>t.replaceText(e,he(e,r))}))}))},"ClassDeclaration:exit"(){n=new Set}}}});function ct(e,t,r){return[...e].some(e=>e===r||function(e,t){return`${e}${Se(t)}`}(e,t)===r)}var pt=r({name:"no-inputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `inputs` metadata property. See more at https://angular.io/styleguide#style-05-12",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputsMetadataProperty:"Use `@Input` rather than the `inputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:e=>({[`${be} ${Ce("inputs")}`](t){e.report({node:t,messageId:"noInputsMetadataProperty"})}})}),ut=r({name:"no-lifecycle-call",meta:{type:"suggestion",docs:{description:"Disallows explicit calls to lifecycle methods",category:"Best Practices",recommended:!1},schema:[],messages:{noLifecycleCall:"Avoid explicit calls to lifecycle methods"}},defaultOptions:[],create:t=>({[`ClassDeclaration CallExpression > MemberExpression[property.name=${fe([...ne])}]`]:r=>{const n=V(r,N);!n||!G(n)||function(e){return e.type===p.AST_NODE_TYPES.Super}(r.object)&&function(t){const r=V(t,U);return Boolean(r&&function({property:t},{key:r}){return e.ASTUtils.isIdentifier(t)&&e.ASTUtils.isIdentifier(r)&&t.name===r.name}(t,r))}(r)||t.report({node:r.parent,messageId:"noLifecycleCall"})}})});let dt=null;function mt(){var e;return null!=(e=dt)?e:dt=new Set(["abort","afterprint","animationend","animationiteration","animationstart","appinstalled","audioprocess","audioend","audiostart","beforeprint","beforeunload","beginEvent","blocked","blur","boundary","cached","canplay","canplaythrough","change","chargingchange","chargingtimechange","checking","click","close","complete","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","devicechange","devicelight","devicemotion","deviceorientation","deviceproximity","dischargingtimechange","DOMAttributeNameChanged","DOMAttrModified","DOMCharacterDataModified","DOMContentLoaded","DOMElementNameChanged","focus","focusin","focusout","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","downloading","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","end","ended","endEvent","error","fullscreenchange","fullscreenerror","gamepadconnected","gamepaddisconnected","gotpointercapture","hashchange","lostpointercapture","input","invalid","keydown","keypress","keyup","languagechange","levelchange","load","loadeddata","loadedmetadata","loadend","loadstart","mark","message","messageerror","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","nomatch","notificationclick","noupdate","obsolete","offline","online","open","orientationchange","pagehide","pageshow","paste","pause","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","pointerlockerror","pointermove","pointerout","pointerover","pointerup","play","playing","popstate","progress","push","pushsubscriptionchange","ratechange","readystatechange","repeatEvent","reset","resize","resourcetimingbufferfull","result","resume","scroll","seeked","seeking","select","selectstart","selectionchange","show","soundend","soundstart","speechend","speechstart","stalled","start","storage","submit","success","suspend","SVGAbort","SVGError","SVGLoad","SVGResize","SVGScroll","SVGUnload","SVGZoom","timeout","timeupdate","touchcancel","touchend","touchmove","touchstart","transitionend","unload","updateready","upgradeneeded","userproximity","voiceschanged","versionchange","visibilitychange","volumechange","waiting","wheel"])}var gt=r({name:"no-output-native",meta:{type:"suggestion",docs:{description:"Ensures that output bindings, including aliases, are not named as standard DOM events",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputNative:"Output bindings, including aliases, should not be named as standard DOM events"}},defaultOptions:[],create(e){const t=mt();return{[[ke,Me,je].join(",")](r){const[n,a]=ye(r).replace(/\s/g,"").split(":");(t.has(n)||t.has(a))&&e.report({node:r,messageId:"noOutputNative"})}}}}),ft=r({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:'Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.io/guide/styleguide#style-05-16',category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputOnPrefix:'Output bindings, including aliases, should not be named "on", nor prefixed with it (https://angular.io/guide/styleguide#style-05-16)'}},defaultOptions:[],create(e){const t=/^on(([^a-z])|(?=$))/;return{[[ke,Me,je].join(",")](r){const[n,a]=ye(r).replace(/\s/g,"").split(":");(t.test(n)||t.test(a))&&e.report({node:r,messageId:"noOutputOnPrefix"})}}}}),yt=r({name:"no-output-rename",meta:{type:"suggestion",docs:{description:"Ensures that output bindings are not aliased",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[],messages:{noOutputRename:"Output bindings should not be aliased (https://angular.io/guide/styleguide#style-05-13)",suggestRemoveAliasName:"Remove alias name",suggestReplaceOriginalNameWithAliasName:"Remove alias name and use it as the original name"}},defaultOptions:[],create(t){let r=new Set;return{[Pe](e){r=new Set(Te(ye(e)).split(","))},[Me](n){const a=V(n,k);if(!a||!e.ASTUtils.isIdentifier(a.key))return;const o=ye(n),s=ye(a.key);o===s?t.report({node:n,messageId:"noOutputRename",fix:e=>e.remove(n)}):ht(r,s,o)||t.report({node:n,messageId:"noOutputRename",suggest:[{messageId:"suggestRemoveAliasName",fix:e=>e.remove(n)},{messageId:"suggestReplaceOriginalNameWithAliasName",fix:e=>[e.remove(n),e.replaceText(a.key,o.includes("-")?`'${o}'`:o)]}]})},[ke](e){const[n,a]=Te(ye(e)).split(":");a&&(a===n?t.report({node:e,messageId:"noOutputRename",fix:t=>t.replaceText(e,he(e,n))}):ht(r,n,a)||t.report({node:e,messageId:"noOutputRename",suggest:[["suggestRemoveAliasName",n],["suggestReplaceOriginalNameWithAliasName",a]].map(([t,r])=>({messageId:t,fix:t=>t.replaceText(e,he(e,r))}))}))},"ClassDeclaration:exit"(){r=new Set}}}});function ht(e,t,r){return[...e].some(e=>e===r||function(e,t){return`${e}${Se(t)}`}(e,t)===r)}var St=r({name:"no-outputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `outputs` metadata property. See more at https://angular.io/styleguide#style-05-12",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputsMetadataProperty:"Use `@Output` rather than the `outputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:e=>({[`${be} ${Ce("outputs")}`](t){e.report({node:t,messageId:"noOutputsMetadataProperty"})}})}),Tt=r({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle",suggestRemovePipeImpure:"Remove `pure` property"}},defaultOptions:[],create(e){const t=e.getSourceCode();return{[`${Ie} ObjectExpression > Property:matches([key.name='pure'], [key.value='pure']):matches([value.value=false], [value.operator='!'][value.argument.value=true])[computed=false]`](r){e.report({node:r,messageId:"noPipeImpure",suggest:[{messageId:"suggestRemovePipeImpure",fix:e=>X(t,r,e)}]})}}}}),xt=r({name:"no-queries-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `queries` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noQueriesMetadataProperty:`Use @${y.Output} rather than the \`queries\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[be](t){const r=ie(t,"queries");r&&e.report({node:r.parent,messageId:"noQueriesMetadataProperty"})}})}),vt=r({name:"no-empty-lifecycle-method",meta:{type:"suggestion",docs:{description:"Disallows declaring empty lifecycle methods",category:"Best Practices",recommended:"error",suggestion:!0},schema:[],messages:{noEmptyLifecycleMethod:"Lifecycle methods should not be empty",suggestRemoveLifecycleMethod:"Remove lifecycle method"}},defaultOptions:[],create(e){const t=e.getSourceCode();return{[`ClassDeclaration > ClassBody > MethodDefinition[key.name=${fe([...ne])}][value.body.body.length=0]`](r){G(r.parent.parent)&&e.report({node:r,messageId:"noEmptyLifecycleMethod",suggest:[{messageId:"suggestRemoveLifecycleMethod",fix:e=>{var n;const a=null!=(n=F(r,"@angular/core"))?n:[],o=r.key.name.replace(/^ng+/,"");return[e.remove(r),J(t,r.parent.parent,o,e),W(t,a,o,e)].filter(ue)}}]})}}}});const bt="prefer-on-push-component-change-detection";var Et=r({name:bt,meta:{type:"suggestion",docs:{description:"Enforces component's change detection to ChangeDetectionStrategy.OnPush.",category:"Best Practices",recommended:!1},schema:[],messages:{preferOnPushComponentChangeDetection:"The changeDetection value of a component should be set to ChangeDetectionStrategy.OnPush"}},defaultOptions:[],create:t=>({[Ee](r){const n=ie(r,"changeDetection");n?e.ASTUtils.isIdentifier(n.property)&&"OnPush"===n.property.name||t.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):t.report({node:r,messageId:"preferOnPushComponentChangeDetection"})}})}),wt=r({name:"prefer-output-readonly",meta:{type:"suggestion",docs:{description:"Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{preferOutputReadonly:"Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned",suggestAddReadonlyModifier:"Add `readonly` modifier"}},defaultOptions:[],create:e=>({[`ClassProperty:not([readonly]) > ${De}`]({parent:{key:t}}){e.report({node:t,messageId:"preferOutputReadonly",suggest:[{messageId:"suggestAddReadonlyModifier",fix:e=>e.insertTextBefore(t,"readonly ")}]})}})});const It=/^\.\.?\/.+/;var Dt=r({name:"relative-url-prefix",meta:{type:"suggestion",docs:{description:"The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04",category:"Best Practices",recommended:!1},schema:[],messages:{relativeUrlPrefix:"The ./ and ../ prefix is standard syntax for relative URLs. (https://angular.io/styleguide#style-05-04)"}},defaultOptions:[],create:e=>({[`${Ee} Property[key.name='templateUrl']`]({value:t}){Ct(t)&&e.report({node:t,messageId:"relativeUrlPrefix"})},[`${Ee} Property[key.name='styleUrls']`]({value:t}){j(t)&&t.elements.filter(Ct).forEach(t=>{e.report({node:t,messageId:"relativeUrlPrefix"})})}})});function Ct(e){return!K(e)||!It.test(e.value)}const Pt=["bootstrap","declarations","entryComponents","exports","imports","providers","schemas"];var Ot=r({name:"sort-ngmodule-metadata-arrays",meta:{type:"suggestion",docs:{description:"Enforces ASC alphabetical order for NgModule metadata arrays for easy visual scanning",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{sortNgmoduleMetadataArrays:"NgModule metadata arrays should be sorted in ASC alphabetical order"}},defaultOptions:[],create:t=>({'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(r){Pt.forEach(n=>{const a=ie(r,n);if(!a||!j(a)||a.elements.length<2)return;const o=a.elements.filter(e.ASTUtils.isIdentifier).map((e,t,r)=>[e,r[t+1]]).find(([e,t])=>t&&1===e.name.localeCompare(t.name));if(!o)return;const[s,i]=o;t.report({messageId:"sortNgmoduleMetadataArrays",node:s,fix:e=>[e.replaceText(s,i.name),e.replaceText(i,s.name)]})})}})}),At=r({name:"use-component-selector",meta:{type:"suggestion",docs:{description:"Component selector must be declared",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentSelector:"The selector of the component is mandatory"}},defaultOptions:[],create:e=>({[Ee](t){const r=ie(t,"selector");r&&K(r)&&r.value.length||e.report({node:t,messageId:"useComponentSelector"})}})}),Nt=r({name:"use-component-view-encapsulation",meta:{type:"suggestion",docs:{description:"Disallows using `ViewEncapsulation.None`",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentViewEncapsulation:"Using `ViewEncapsulation.None` makes your styles global, which may have an unintended effect",suggestRemoveViewEncapsulationNone:"Remove `ViewEncapsulation.None`"}},defaultOptions:[],create(e){const t=e.getSourceCode();return{[`${Ee} Property:matches([key.name='encapsulation'], [key.value='encapsulation']) > MemberExpression[object.name='ViewEncapsulation'] > Identifier[name='None']`](r){e.report({node:r,messageId:"useComponentViewEncapsulation",suggest:[{messageId:"suggestRemoveViewEncapsulationNone",fix:e=>{var n;const a=null!=(n=F(r,"@angular/core"))?n:[];return[X(t,r.parent.parent,e),W(t,a,"ViewEncapsulation",e)].filter(ue)}}]})}}}}),kt=r({name:"use-injectable-provided-in",meta:{type:"suggestion",docs:{description:`"Using the 'providedIn' property makes classes decorated with @${d.Injectable} tree shakeable`,category:"Best Practices",recommended:!1},schema:[],messages:{useInjectableProvidedIn:`Classes decorated with @${d.Injectable} should use the 'providedIn' property`}},defaultOptions:[],create:e=>({'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(t){ie(t,"providedIn")||e.report({node:t,messageId:"useInjectableProvidedIn"})}})}),Mt=r({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.io/styleguide#style-09-01",category:"Best Practices",recommended:"warn"},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${fe([...ne])}]`]({key:t,parent:{parent:r}}){if(!G(r))return;const n=te(r),a=t.name,o=(e=>e.slice(2))(a);n.includes(h[o])||e.report({node:t,messageId:"useLifecycleInterface",data:{interfaceName:o,methodName:a}})}})}),jt=r({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:"Ensures that `Pipes` implement `PipeTransform` interface",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{usePipeTransformInterface:"Pipes should implement `PipeTransform` interface"}},defaultOptions:[],create:e=>({"ClassDeclaration:not(:has(TSClassImplements:matches([expression.name='PipeTransform'], [expression.property.name='PipeTransform']))) > Decorator[expression.callee.name='Pipe']"({parent:t}){var r;e.report({node:null!=(r=t.id)?r:t,messageId:"usePipeTransformInterface",fix:e=>{const{implementsNodeReplace:r,implementsTextReplace:n}=function({id:e,implements:t},r){const[n,a]=t?[Y(t),`, ${r}`]:[e,` implements ${r}`];return{implementsNodeReplace:n,implementsTextReplace:a}}(t,"PipeTransform");return[H(t,"@angular/core","PipeTransform",e),e.insertTextAfter(r,n)].filter(ue)}})}})}),_t=r({name:"pipe-prefix",meta:{type:"suggestion",docs:{description:"Enforce consistent prefix for pipes.",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"},minimum:1,uniqueItems:!0}},additionalProperties:!1}],messages:{pipePrefix:"@Pipes should be prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[Ie](r){const n=ie(r,"name");if(!n)return;if(!function(e){return Array.isArray(e)&&e.length>0}(t))return;const a=t.join("|"),o=de.prefix(a,"camelCase");let s;K(n)?s=n.value:$(n)&&n.quasis[0]&&(s=n.quasis[0].value.raw),s&&(o.apply(this,[s])||e.report({node:n,messageId:"pipePrefix",data:{prefixes:ge(t)}}))}})});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/component-max-inline-declarations":"error","@angular-eslint/component-selector":"error","@angular-eslint/contextual-decorator":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":"error","@angular-eslint/no-attribute-decorator":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-forward-ref":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-prefix":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-lifecycle-call":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/no-pipe-impure":"error","@angular-eslint/no-queries-metadata-property":"error","@angular-eslint/pipe-prefix":"error","@angular-eslint/prefer-on-push-component-change-detection":"error","@angular-eslint/prefer-output-readonly":"error","@angular-eslint/relative-url-prefix":"error","@angular-eslint/sort-ngmodule-metadata-arrays":"error","@angular-eslint/use-component-selector":"error","@angular-eslint/use-component-view-encapsulation":"error","@angular-eslint/use-injectable-provided-in":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error"}},base:{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module",project:"./tsconfig.json"},plugins:["@typescript-eslint","@angular-eslint"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"warn","@angular-eslint/use-pipe-transform-interface":"error"}},"recommended--extra":{extends:"./configs/base.json",rules:{"no-restricted-imports":["error",{paths:[{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}]}],"@typescript-eslint/member-ordering":["error",{default:["static-field","instance-field","static-method","instance-method"]}],"no-restricted-syntax":["error",{selector:'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',message:"Unexpected property on console object was called"}],"@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-non-null-assertion":"error","no-fallthrough":"error"}},"ng-cli-compat":{extends:["./configs/base.json"],env:{browser:!0,es6:!0,node:!0},plugins:["eslint-plugin-import","eslint-plugin-jsdoc","eslint-plugin-prefer-arrow"],rules:{"@typescript-eslint/interface-name-prefix":"off","@typescript-eslint/explicit-member-accessibility":"off","sort-keys":"off","@angular-eslint/component-class-suffix":"error","@angular-eslint/component-selector":["error",{type:"element",prefix:"app",style:"kebab-case"}],"@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":["error",{type:"attribute",prefix:"app",style:"camelCase"}],"@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"off","@typescript-eslint/ban-types":["error",{types:{Object:{message:"Avoid using the `Object` type. Did you mean `object`?"},Function:{message:"Avoid using the `Function` type. Prefer a specific function type, like `() => void`."},Boolean:{message:"Avoid using the `Boolean` type. Did you mean `boolean`?"},Number:{message:"Avoid using the `Number` type. Did you mean `number`?"},String:{message:"Avoid using the `String` type. Did you mean `string`?"},Symbol:{message:"Avoid using the `Symbol` type. Did you mean `symbol`?"}}}],"@typescript-eslint/consistent-type-assertions":"error","@typescript-eslint/dot-notation":"error","@typescript-eslint/member-ordering":"error","@typescript-eslint/naming-convention":"error","@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-parameter-properties":"off","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":["error",{path:"always",types:"prefer-import",lib:"always"}],"@typescript-eslint/unified-signatures":"error",complexity:"off","constructor-super":"error",eqeqeq:["error","smart"],"guard-for-in":"error","id-blacklist":["error","any","Number","number","String","string","Boolean","boolean","Undefined","undefined"],"id-match":"error","import/no-deprecated":"warn","jsdoc/newline-after-description":"error","jsdoc/no-types":"error","max-classes-per-file":"off","no-bitwise":"error","no-caller":"error","no-cond-assign":"error","no-console":["error",{allow:["log","warn","dir","timeLog","assert","clear","count","countReset","group","groupEnd","table","dirxml","error","groupCollapsed","Console","profile","profileEnd","timeStamp","context"]}],"no-debugger":"error","no-empty":"off","no-eval":"error","no-fallthrough":"error","no-invalid-this":"off","no-new-wrappers":"error","no-restricted-imports":["error",{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}],"@typescript-eslint/no-shadow":["error",{hoist:"all"}],"no-throw-literal":"error","no-undef-init":"error","no-underscore-dangle":"error","no-unsafe-finally":"error","no-unused-labels":"error","no-var":"error","object-shorthand":"error","one-var":["error","never"],"prefer-arrow/prefer-arrow-functions":"error","prefer-const":"error",radix:"error","use-isnan":"error","valid-typeof":"off"}},"ng-cli-compat--formatting-add-on":{plugins:["eslint-plugin-jsdoc"],rules:{"arrow-body-style":"error","arrow-parens":"off","comma-dangle":"off",curly:"error","eol-last":"error","jsdoc/check-alignment":"error","max-len":["error",{code:140}],"new-parens":"error","no-multiple-empty-lines":"off","no-trailing-spaces":"error","quote-props":["error","as-needed"],"space-before-function-paren":["error",{anonymous:"never",asyncArrow:"always",named:"never"}],"@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1}}],quotes:"off","@typescript-eslint/quotes":["error","single",{allowTemplateLiterals:!0}],"@typescript-eslint/semi":["error","always"],"@typescript-eslint/type-annotation-spacing":"error"}}},rules:{"contextual-decorator":xe,"component-class-suffix":_e,"component-max-inline-declarations":$e,"component-selector":Ye,"contextual-lifecycle":He,"directive-class-suffix":We,"directive-selector":ze,"no-attribute-decorator":Ge,"no-conflicting-lifecycle":et,"no-forward-ref":tt,"no-host-metadata-property":nt,"no-input-prefix":ot,"no-input-rename":lt,"no-inputs-metadata-property":pt,"no-lifecycle-call":ut,"no-output-native":gt,"no-output-on-prefix":ft,"no-output-rename":yt,"no-outputs-metadata-property":St,"no-pipe-impure":Tt,"no-queries-metadata-property":xt,"no-empty-lifecycle-method":vt,[bt]:Et,"prefer-output-readonly":wt,"relative-url-prefix":Dt,"sort-ngmodule-metadata-arrays":Ot,"use-component-selector":At,"use-component-view-encapsulation":Nt,"use-injectable-provided-in":kt,"use-lifecycle-interface":Mt,"use-pipe-transform-interface":jt,"pipe-prefix":_t}};
@@ -7,14 +7,13 @@ export declare const MODULE_CLASS_DECORATOR = "ClassDeclaration > Decorator[expr
7
7
  export declare const INPUT_DECORATOR = "Decorator[expression.callee.name=\"Input\"]";
8
8
  export declare const OUTPUT_DECORATOR = "Decorator[expression.callee.name=\"Output\"]";
9
9
  export declare const LITERAL_OR_TEMPLATE_ELEMENT = ":matches(Literal, TemplateElement)";
10
- export declare const SELECTOR_METADATA_PROPERTY = "Property:matches([key.name=\"selector\"], [key.value=\"selector\"])";
10
+ export declare function metadataProperty<TKey extends string>(key: TKey): `Property:matches([key.name='${TKey}'][computed=false], [key.value='${TKey}'], [key.quasis.0.value.raw='${TKey}'])`;
11
11
  export declare const COMPONENT_SELECTOR_LITERAL: string;
12
12
  export declare const DIRECTIVE_SELECTOR_LITERAL: string;
13
13
  export declare const COMPONENT_OR_DIRECTIVE_SELECTOR_LITERAL: string;
14
- export declare const INPUTS_METADATA_PROPERTY = "Property:matches([key.name=\"inputs\"], [key.value=\"inputs\"])";
15
14
  export declare const INPUTS_METADATA_PROPERTY_LITERAL: string;
16
15
  export declare const INPUT_ALIAS: string;
17
16
  export declare const INPUT_PROPERTY_OR_SETTER: string;
18
- export declare const OUTPUTS_METADATA_PROPERTY: string;
17
+ export declare const OUTPUTS_METADATA_PROPERTY_LITERAL: string;
19
18
  export declare const OUTPUT_ALIAS: string;
20
19
  export declare const OUTPUT_PROPERTY_OR_GETTER: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/eslint-plugin",
3
- "version": "12.3.1-alpha.0+3392ccc",
3
+ "version": "12.3.1",
4
4
  "description": "ESLint plugin for Angular applications, following angular.io/styleguide",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -20,12 +20,12 @@
20
20
  "@typescript-eslint/experimental-utils": "4.28.2"
21
21
  },
22
22
  "devDependencies": {
23
- "@angular-eslint/utils": "12.3.0"
23
+ "@angular-eslint/utils": "12.3.1"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@angular/compiler": ">= 12.0.0 < 13.0.0",
27
27
  "eslint": "*",
28
28
  "typescript": "*"
29
29
  },
30
- "gitHead": "3392ccc0e32d57d00badf125c65b271aa12919a7"
30
+ "gitHead": "9919aa840c82ba796129ebd4d94fff27b1e41181"
31
31
  }