Skip to content

Commit

Permalink
docs(readme): add deatils about new options
Browse files Browse the repository at this point in the history
  • Loading branch information
ducktordanny committed Jun 16, 2024
1 parent f8b5350 commit 552f014
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ With this rule you can detect unsorted arrays of imports, declarations, provider
"ng-module-sort/decorator-array-items": [
"error",
{
"reverseSort": false
"reverseSort": false,
"extraDecorators": [],
"extraProperties": []
}
]
}
Expand Down Expand Up @@ -111,6 +113,23 @@ import {Component} from '@angular/core';
})
```

- By using options `extraDecorator: ['YourDecorators']` and `extraProperties: ['yourProperties']` you can extend the default list that is used for the checks.

```ts
import {Component} from '@angular/core';

@YourDecorators({
yourProperties: [
Apple,
Banana,
Paprika,
SomethingElse,
],
})
```

The default options can be found [here](./lib/constants.ts).

### decorator-properties

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 comments on commit 552f014

Please sign in to comment.