@angular-eslint/eslint-plugin
Advanced tools
Comparing version 0.0.1-alpha.16 to 0.0.1-alpha.17
@@ -0,1 +1,9 @@ | ||
import { RULE_NAME as componentClassSuffixRuleName } from './rules/component-class-suffix'; | ||
import { RULE_NAME as noHostMetadataPropertyRuleName } from './rules/no-host-metadata-property'; | ||
import { RULE_NAME as noInputsMetadataPropertyRuleName } from './rules/no-inputs-metadata-property'; | ||
import { RULE_NAME as noOutputOnPrefixRuleName } from './rules/no-output-on-prefix'; | ||
import { RULE_NAME as noOutputsMetadataPropertyRuleName } from './rules/no-outputs-metadata-property'; | ||
import { RULE_NAME as noPipeImpureRuleName } from './rules/no-pipe-impure'; | ||
import { RULE_NAME as noQueriesMetadataPropertyRuleName } from './rules/no-queries-metadata-property'; | ||
import { RULE_NAME as preferOnPushComponentChangeDetectionRuleName } from './rules/prefer-on-push-component-change-detection'; | ||
import { RULE_NAME as useComponentSelectorRuleName } from './rules/use-component-selector'; | ||
@@ -6,8 +14,2 @@ import { RULE_NAME as useComponentViewEncapsulationRuleName } from './rules/use-component-view-encapsulation'; | ||
import { RULE_NAME as usePipeTransformInterfaceRuleName } from './rules/use-pipe-transform-interface'; | ||
import { RULE_NAME as noOutputOnPrefixRuleName } from './rules/no-output-on-prefix'; | ||
import { RULE_NAME as noHostMetadataPropertyRuleName } from './rules/no-host-metadata-property'; | ||
import { RULE_NAME as noInputsMetadataPropertyRuleName } from './rules/no-inputs-metadata-property'; | ||
import { RULE_NAME as noOutputsMetadataPropertyRuleName } from './rules/no-outputs-metadata-property'; | ||
import { RULE_NAME as noQueriesMetadataPropertyRuleName } from './rules/no-queries-metadata-property'; | ||
import { RULE_NAME as componentClassSuffixRuleName } from './rules/component-class-suffix'; | ||
declare const _default: { | ||
@@ -28,4 +30,6 @@ rules: { | ||
}], import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleListener>; | ||
[noPipeImpureRuleName]: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"noPipeImpure", [], import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleListener>; | ||
[preferOnPushComponentChangeDetectionRuleName]: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"preferOnPushComponentChangeDetection", [], import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleListener>; | ||
}; | ||
}; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
var e,t,n,r,a=require("@typescript-eslint/experimental-utils").ESLintUtils.RuleCreator(function(){return""}),s='ClassDeclaration > Decorator:matches([expression.callee.name="Component"], [expression.callee.name="Directive"])',o='ClassDeclaration > Decorator[expression.callee.name="Component"]',i=Object.keys;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(e||(e={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(t||(t={})),function(e){e.HostListener="HostListener"}(n||(n={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(r||(r={}));var c,u,p=Object.assign({},t,n,r);!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit",e.DoCheck="DoCheck"}(c||(c={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit",e.ngDoCheck="ngDoCheck"}(u||(u={}));var m=i(c),d=i(u);function l(e){return"CallExpression"===e.type}function f(e){return"Identifier"===e.type}function y(e){return"MemberExpression"===e.type}function g(e){return"ObjectExpression"===e.type}function h(e){return"MethodDefinition"===e.type}var C,v=function(e){return function(e){return"ClassDeclaration"===e.type}(e)?e.id?e.id.name:void 0:e.parent?v(e.parent):void 0},P=function(e){var t=e.expression;return y(t)?t.property.name:t.name},I=function(e){return function(e){return e.implements||[]}(e).map(P)},O=new Set(m),x=new Set(d),w=function(e){return O.has(e)},k=function(e,t){var n=function(e,t){var n=function(e){var t=e.expression;if(l(t)&&t.arguments&&0!==t.arguments.length){var n=t.arguments[0];return g(n)&&n.properties?n:void 0}}(e);if(n&&g(n)){var r=n.properties.find(function(e){return!(!e.key||!f(e.key)||e.key.name!==t)});if(r&&"Property"===r.type)return r}}(e,t);if(n)return n.value},D=function(e){return function(e){return"Literal"===e.type}(e.key)?e.key.value:e.key.name},S=function(e){return e.slice(2)},b=a({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 '{{className}}' is mandatory"}},defaultOptions:[],create:function(e){var t;return(t={})[o]=function(t){var n=t.parent;if(n&&n.id&&n.id.name){var r=k(t,"selector");r&&"Literal"===r.type&&"string"==typeof r.value&&r.value.length||e.report({node:t,messageId:"useComponentSelector",data:{className:n.id.name}})}},t}}),A=a({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"}},defaultOptions:[],create:function(e){var t;return(t={})[o]=function(t){var n=k(t,"encapsulation");!n||y(n)&&f(n.property)&&"None"!==n.property.name||e.report({node:n,messageId:"useComponentViewEncapsulation"})},t}}),N=a({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures classes implement lifecycle interfaces corresponding to the declared lifecycle methods",category:"Best Practices",recommended:!1},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:function(e){return{ClassDeclaration:function(t){for(var n=function(e){return I(e).filter(w)}(t),r=0,a=function(e){return e.body.body.filter(h)}(t);r<a.length;r+=1){var s=a[r],o=D(s);if(x.has(o)){var i=S(o);n.includes(c[i])||e.report({node:s.key,messageId:"useLifecycleInterface",data:{interfaceName:i,methodName:o}})}}}}}}),V=a({name:"use-pipe-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes implementing PipeTransform interface use @"+e.Pipe+" decorator",category:"Best Practices",recommended:!1},schema:[],messages:{usePipeDecorator:"Classes that implement the PipeTransform interface should be decorated with @"+e.Pipe}},defaultOptions:[],create:function(e){var t;return(t={})['ClassDeclaration > TSClassImplements:matches([expression.name="PipeTransform"], [expression.property.name="PipeTransform"])']=function(t){var n=t.parent;(function(e,t){if(n.decorators)return n.decorators.find(function(e){return l(e.expression)&&e.expression.arguments&&e.expression.arguments.length>0&&"Pipe"===function(e){var t=e.expression;return f(t)?t.name:l(t)&&f(t.callee)?t.callee.name:void 0}(e)})})()||e.report({node:n,messageId:"usePipeDecorator"})},t}}),B=a({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:"Ensures tht classes decorated with @"+e.Pipe+" implement PipeTransform interface",category:"Best Practices",recommended:!1},schema:[],messages:{usePipeTransformInterface:"Classes decorated with @"+e.Pipe+" decorator should implement PipeTransform interface"}},defaultOptions:[],create:function(e){var t;return(t={})['ClassDeclaration > Decorator[expression.callee.name="Pipe"]']=function(t){var n=t.parent;I(n).find(function(e){return"PipeTransform"===e})||e.report({node:n,messageId:"usePipeTransformInterface"})},t}}),E=a({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:"Name events without the prefix on. See more at https://angular.io/guide/styleguide#dont-prefix-output-properties.",category:"Best Practices",recommended:!1},schema:[],messages:{noOutputOnPrefix:'In the class "{{className}}", the output property "{{memberName}}" should not be prefixed with on'}},defaultOptions:[],create:function(e){return{'ClassProperty > Decorator[expression.callee.name="Output"]':function(t){var n=t.parent,r=v(t),a=function(e){if("Identifier"===n.key.type)return n.key.name;if("Literal"===n.key.type)return n.key.raw;throw new Error('Unexpected "ClassProperty.key.type" provided: '+n.key.type)}();a&&/^on((?![a-z])|(?=$))/.test(a)&&e.report({node:n,messageId:"noOutputOnPrefix",data:{className:r,memberName:a}})}}}}),M=a({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-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noHostMetadataProperty:"Use @"+p.Output+" rather than the `host` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[s]=function(t){var n=k(t,"host");n&&e.report({node:n.parent,messageId:"noHostMetadataProperty"})},t}}),T=a({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:!1},schema:[],messages:{noInputsMetadataProperty:"Use @"+p.Input+" rather than the `inputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[s]=function(t){var n=k(t,"inputs");n&&e.report({node:n.parent,messageId:"noInputsMetadataProperty"})},t}}),L=a({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:!1},schema:[],messages:{noOutputsMetadataProperty:"Use @"+p.Output+" rather than the `outputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[s]=function(t){var n=k(t,"outputs");n&&e.report({node:n.parent,messageId:"noOutputsMetadataProperty"})},t}}),j=a({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 @"+p.Output+" rather than the `queries` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[s]=function(t){var n=k(t,"queries");n&&e.report({node:n.parent,messageId:"noQueriesMetadataProperty"})},t}}),H=a({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:!1},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create:function(e,t){var n,r=t[0].suffixes;return(n={})[o]=function(t){var n=t.parent,a=v(n);a&&r.some(function(e){return a.endsWith(e)})||e.report({node:n.id?n.id:n,messageId:"componentClassSuffix",data:{className:a,suffixes:r}})},n}}),U={rules:(C={},C["use-component-selector"]=b,C["use-component-view-encapsulation"]=A,C["use-lifecycle-interface"]=N,C["use-pipe-decorator"]=V,C["use-pipe-transform-interface"]=B,C["no-output-on-prefix"]=E,C["no-host-metadata-property"]=M,C["no-inputs-metadata-property"]=T,C["no-outputs-metadata-property"]=L,C["no-queries-metadata-property"]=j,C["component-class-suffix"]=H,C)};module.exports=U; | ||
var e,t,n,r,a=require("@typescript-eslint/experimental-utils").ESLintUtils.RuleCreator(function(){return""}),o='ClassDeclaration > Decorator:matches([expression.callee.name="Component"], [expression.callee.name="Directive"])',s='ClassDeclaration > Decorator[expression.callee.name="Component"]',i=Object.keys;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(e||(e={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(t||(t={})),function(e){e.HostListener="HostListener"}(n||(n={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(r||(r={}));var c,p,u=Object.assign({},t,n,r);!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit",e.DoCheck="DoCheck"}(c||(c={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit",e.ngDoCheck="ngDoCheck"}(p||(p={}));var m=i(c),d=i(p);function l(e){return"CallExpression"===e.type}function f(e){return"Identifier"===e.type}function g(e){return"MemberExpression"===e.type}function h(e){return"ObjectExpression"===e.type}function y(e){return"Literal"===e.type}function C(e){return"MethodDefinition"===e.type}var v,P=function(e){return function(e){return"ClassDeclaration"===e.type}(e)?e.id?e.id.name:void 0:e.parent?P(e.parent):void 0},O=function(e){var t=e.expression;return g(t)?t.property.name:t.name},I=function(e){return function(e){return e.implements||[]}(e).map(O)},D=new Set(m),x=new Set(d),w=function(e){return D.has(e)},k=function(e,t){var n=function(e){var t=e.expression;if(l(t)&&t.arguments&&0!==t.arguments.length){var n=t.arguments[0];return h(n)&&n.properties?n:void 0}}(e);if(n&&h(n)){var r=n.properties.find(function(e){return!(!e.key||!f(e.key)||e.key.name!==t)});if(r&&"Property"===r.type)return r}},S=function(e,t){var n=k(e,t);if(n)return n.value},b=function(e){return y(e.key)?e.key.value:e.key.name},A=function(e){return e.slice(2)},N=a({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:!1},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create:function(e,t){var n,r=t[0].suffixes;return(n={})[s]=function(t){var n=t.parent,a=P(n);a&&r.some(function(e){return a.endsWith(e)})||e.report({node:n.id?n.id:n,messageId:"componentClassSuffix",data:{className:a,suffixes:r}})},n}}),V=a({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-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noHostMetadataProperty:"Use @"+u.Output+" rather than the `host` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[o]=function(t){var n=S(t,"host");n&&e.report({node:n.parent,messageId:"noHostMetadataProperty"})},t}}),B=a({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:!1},schema:[],messages:{noInputsMetadataProperty:"Use @"+u.Input+" rather than the `inputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[o]=function(t){var n=S(t,"inputs");n&&e.report({node:n.parent,messageId:"noInputsMetadataProperty"})},t}}),E=a({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:"Name events without the prefix on. See more at https://angular.io/guide/styleguide#dont-prefix-output-properties.",category:"Best Practices",recommended:!1},schema:[],messages:{noOutputOnPrefix:'In the class "{{className}}", the output property "{{memberName}}" should not be prefixed with on'}},defaultOptions:[],create:function(e){return{'ClassProperty > Decorator[expression.callee.name="Output"]':function(t){var n=t.parent,r=P(t),a=function(e){if("Identifier"===n.key.type)return n.key.name;if("Literal"===n.key.type)return n.key.raw;throw new Error('Unexpected "ClassProperty.key.type" provided: '+n.key.type)}();a&&/^on((?![a-z])|(?=$))/.test(a)&&e.report({node:n,messageId:"noOutputOnPrefix",data:{className:r,memberName:a}})}}}}),T=a({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:!1},schema:[],messages:{noOutputsMetadataProperty:"Use @"+u.Output+" rather than the `outputs` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[o]=function(t){var n=S(t,"outputs");n&&e.report({node:n.parent,messageId:"noOutputsMetadataProperty"})},t}}),M=a({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes.",category:"Best Practices",recommended:!1},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle."}},defaultOptions:[],create:function(e){var t;return(t={})['ClassDeclaration > Decorator[expression.callee.name="Pipe"]']=function(t){var n=k(t,"pure");n&&y(n.value)&&!n.value.value&&e.report({node:n.value,messageId:"noPipeImpure"})},t}}),L=a({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 @"+u.Output+" rather than the `queries` metadata property (https://angular.io/styleguide#style-05-12)"}},defaultOptions:[],create:function(e){var t;return(t={})[o]=function(t){var n=S(t,"queries");n&&e.report({node:n.parent,messageId:"noQueriesMetadataProperty"})},t}}),j="prefer-on-push-component-change-detection",H=a({name:j,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:function(e){var t;return(t={})[s]=function(t){var n=S(t,"changeDetection");n?f(n.property)&&"OnPush"===n.property.name||e.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):e.report({node:t,messageId:"preferOnPushComponentChangeDetection"})},t}}),U=a({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 '{{className}}' is mandatory"}},defaultOptions:[],create:function(e){var t;return(t={})[s]=function(t){var n=t.parent;if(n&&n.id&&n.id.name){var r=S(t,"selector");r&&"Literal"===r.type&&"string"==typeof r.value&&r.value.length||e.report({node:t,messageId:"useComponentSelector",data:{className:n.id.name}})}},t}}),q=a({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"}},defaultOptions:[],create:function(e){var t;return(t={})[s]=function(t){var n=S(t,"encapsulation");!n||g(n)&&f(n.property)&&"None"!==n.property.name||e.report({node:n,messageId:"useComponentViewEncapsulation"})},t}}),Q=a({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures classes implement lifecycle interfaces corresponding to the declared lifecycle methods",category:"Best Practices",recommended:!1},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:function(e){return{ClassDeclaration:function(t){for(var n=function(e){return I(e).filter(w)}(t),r=0,a=function(e){return e.body.body.filter(C)}(t);r<a.length;r+=1){var o=a[r],s=b(o);if(x.has(s)){var i=A(s);n.includes(c[i])||e.report({node:o.key,messageId:"useLifecycleInterface",data:{interfaceName:i,methodName:s}})}}}}}}),z=a({name:"use-pipe-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes implementing PipeTransform interface use @"+e.Pipe+" decorator",category:"Best Practices",recommended:!1},schema:[],messages:{usePipeDecorator:"Classes that implement the PipeTransform interface should be decorated with @"+e.Pipe}},defaultOptions:[],create:function(e){var t;return(t={})['ClassDeclaration > TSClassImplements:matches([expression.name="PipeTransform"], [expression.property.name="PipeTransform"])']=function(t){var n=t.parent;(function(e,t){if(n.decorators)return n.decorators.find(function(e){return l(e.expression)&&e.expression.arguments&&e.expression.arguments.length>0&&"Pipe"===function(e){var t=e.expression;return f(t)?t.name:l(t)&&f(t.callee)?t.callee.name:void 0}(e)})})()||e.report({node:n,messageId:"usePipeDecorator"})},t}}),R=a({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:"Ensures tht classes decorated with @"+e.Pipe+" implement PipeTransform interface",category:"Best Practices",recommended:!1},schema:[],messages:{usePipeTransformInterface:"Classes decorated with @"+e.Pipe+" decorator should implement PipeTransform interface"}},defaultOptions:[],create:function(e){var t;return(t={})['ClassDeclaration > Decorator[expression.callee.name="Pipe"]']=function(t){var n=t.parent;I(n).find(function(e){return"PipeTransform"===e})||e.report({node:n,messageId:"usePipeTransformInterface"})},t}}),W={rules:(v={},v["use-component-selector"]=U,v["use-component-view-encapsulation"]=q,v["use-lifecycle-interface"]=Q,v["use-pipe-decorator"]=z,v["use-pipe-transform-interface"]=R,v["no-output-on-prefix"]=E,v["no-host-metadata-property"]=V,v["no-inputs-metadata-property"]=B,v["no-outputs-metadata-property"]=T,v["no-queries-metadata-property"]=L,v["component-class-suffix"]=N,v["no-pipe-impure"]=M,v[j]=H,v)};module.exports=W; |
{ | ||
"name": "@angular-eslint/eslint-plugin", | ||
"version": "0.0.1-alpha.16", | ||
"version": "0.0.1-alpha.17", | ||
"description": "ESLint plugin for Angular applications, following angular.io/styleguide", | ||
@@ -26,3 +26,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "114f417638171bfb11062b26e53601fc5230903a" | ||
"gitHead": "55bbbdccd1898551fffe75dee14278defb823941" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34912
26
310