0.0.2 • Published 1 year ago

prettier-plugin-organize-angular-decorators v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

prettier-plugin-organize-angular-decorators

Plugin for prettier to organize properties in Angular decorators

Usage

First of all, install the plugin:

npm install -D prettier-plugin-organize-angular-decorators

After that, configure it in .prettierrc or prettierrc.js

{
  "plugins": ["prettier-plugin-organize-angular-decorators"],
  "componentDecoratorOrder": [
    "standalone",
    "selector",
    "templateUrl",
    "styleUrls",
    "changeDetection",
    "providers"
  ],
  "directiveDecoratorOrder": [
    "selector",
    "providers"
  ]
}

If you want prettify decorators only in some directories, define patterns in angularOrganizePatterns:

{
  "plugins": ["prettier-plugin-organize-angular-decorators"],
  "componentDecoratorOrder": [
    "standalone",
    "selector",
    "templateUrl",
    "styleUrls",
    "changeDetection",
    "providers"
  ],
  "angularOrganizePatterns": [
    "./src/shared/**/*",
    "./src/modules/**/shared/**/*"
  ]
}
0.0.2

1 year ago

0.0.1

1 year ago