eslint-plugin-ng-extra
v0.1.0
Published
ESLint plugin for Angular applications
Downloads
3
Maintainers
Readme
eslint-plugin-ng-extra
ESLint plugin for Angular applications.
Propose or contribute a new rule ➡
Install
Make sure you have TypeScript and @typescript-eslint/parser
installed:
$ npm install --save-dev typescript @typescript-eslint/parser
Then install the plugin
$ npm install --save-dev eslint eslint-plugin-ng-extra
Usage
Add @typescript-eslint/parser
to the parser field and ng-extra
to the plugins section of your .eslintrc configuration file, then configure the rules you want to use under the rules section.
{
"parser": "@typescript-eslint/parser",
"plugins": ["ng-extra"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:ng-extra"
]
}
Rules
| | | --------------------------------- | | :white_check_mark: = done | | :construction: = work in progress |
Best practices
| Rule | Description | Status |
| -------------------------- | -------------------------------------------------------------- | ------------------ |
| check-http-errors
| Checks that when using the HTTP client, error are caught | :white_check_mark: |
| no-dangling-subscription
| Checks that there are no dangling subscriptions in a component | :white_check_mark: |
| no-nested-subscriptions
| Checks that there are no nested subscriptions in a component | :white_check_mark: |
| no-subject-exposition
| Checks that no subjects are publicly exposed | :white_check_mark: |