2.0.0 • Published 10 months ago

prettier-plugin-organize-angular-decorators v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

prettier-plugin-organize-angular-decorators

Plugin for prettier to organize properties in Angular decorators

Prettier compatibility

  • For prettier 2.x.x use version 1.x.x of this plugin.
  • For prettier 3.x.x use version 2.x.x of this plugin.

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/**/*"
  ]
}
1.0.0

10 months ago

2.0.0

10 months ago

0.0.2

2 years ago

0.0.1

2 years ago