You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,19 @@ This is a repository containing custom ESLint rules for Angular projects
6
6
7
7
## Rules included
8
8
9
-
`destroy-service-provider`: When using `DestroyService` to automatically unsubscribe from an observable, this service MUST be provided in Component/Directive class providers in order for the Service to work properly. This rule ensures the DestroyService is always provided in the `providers` array of the Component or Directive.
9
+
-`destroy-service-provider`: When using `DestroyService` to automatically unsubscribe from an observable, this service MUST be provided in Component/Directive class providers in order for the Service to work properly. This rule ensures the DestroyService is always provided in the `providers` array of the Component or Directive.
10
10
11
11
## Usage
12
12
13
-
### `destroy-service-provider`
13
+
### Install the package
14
14
15
-
Edit your eslint config file as follow
15
+
```bash
16
+
npm install --save-dev eslint-plugin-ngx-eslint
17
+
```
18
+
19
+
### Config rule `destroy-service-provider`
20
+
21
+
Edit your `.eslintrc` config file as follow
16
22
17
23
```json
18
24
{
@@ -23,6 +29,22 @@ Edit your eslint config file as follow
23
29
}
24
30
```
25
31
32
+
If your destroy service class name is different than `DestroyService`, the configuration would be like this
0 commit comments