Skip to content

Commit 552f014

Browse files
committed
docs(readme): add deatils about new options
1 parent f8b5350 commit 552f014

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ With this rule you can detect unsorted arrays of imports, declarations, provider
4848
"ng-module-sort/decorator-array-items": [
4949
"error",
5050
{
51-
"reverseSort": false
51+
"reverseSort": false,
52+
"extraDecorators": [],
53+
"extraProperties": []
5254
}
5355
]
5456
}
@@ -111,6 +113,23 @@ import {Component} from '@angular/core';
111113
})
112114
```
113115

116+
- By using options `extraDecorator: ['YourDecorators']` and `extraProperties: ['yourProperties']` you can extend the default list that is used for the checks.
117+
118+
```ts
119+
import {Component} from '@angular/core';
120+
121+
@YourDecorators({
122+
yourProperties: [
123+
Apple,
124+
Banana,
125+
Paprika,
126+
SomethingElse,
127+
],
128+
})
129+
```
130+
131+
The default options can be found [here](./lib/constants.ts).
132+
114133
### decorator-properties
115134

116135
This rule is still in progress, but basically it will check if the properties in the above decorators are sorted, and provide an autofix to sort them.

0 commit comments

Comments
 (0)