Skip to content

A couple of quality-of-life eslint rules for Angular components.

License

Notifications You must be signed in to change notification settings

monade/eslint-plugin-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests npm version

@monade/eslint-plugin-angular

A couple of quality-of-life eslint rules for Angular components.

THIS PROJECT IS UNDER ACTIVE DEVELOPMENT. IT MAY NOT WORK AS INTENDED

Usage

Install:

yarn add --dev @monade/eslint-plugin-angular

Add to your .eslint.js:

   plugins: [
     ...,
     "@monade/angular"
   ]
   ...
   rules: {
     ...,
      "@monade/angular/remove-empty-styles": 2,
      "@monade/angular/strategy-onpush": 2,
   }

Rules:

... TODO ...

TODO:

  • Document rules
  • [Rule] When strategy is OnPush, show an error if there's a non-scalar property that is not ReadOnly<>
  • [Rule] Component too long
  • [Rule] Suggest strategy OnPush when the component is in the "components" folder
  • [Rule] ADVANCED: Check if there's a reactivity bug with changeDetection: OnPush

Contributing

You can use an AST view tool to debug the structure of some code parts:

About Monade

monade

@monade/eslint-plugin-angular is maintained by mònade srl.

We <3 open source software. Contact us for your next project!

About

A couple of quality-of-life eslint rules for Angular components.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published