2.2.0 • Published 6 months ago

@digitalroute/prettier-config v2.2.0

Weekly downloads
134
License
MIT
Repository
github
Last release
6 months ago

@digitalroute/prettier-config

Prettier shareable configuration for Digitalroute projects.

Usage

Install this config as a devDependency:

npm install @digitalroute/prettier-config --save-dev

Add the following to your package.json:

{
  "prettier": "@digitalroute/prettier-config"
}

Usage with husky and lint-staged

Husky is a tool that triggers npm-scripts based on git actions. Lint-staged let's you run linting and formatting on files that are staged. You can use these two tools to ensure that all commited files are prettified before they are commited.

Install husky and lint-staged as a devDependency:

npm install husky lint-staged --save-dev

Add the following to your package.json:

{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx,js,jsx,json,md,mdx,yml}": "prettier --write"
  }
}
2.2.0

6 months ago

2.1.0

7 months ago

2.0.0

7 months ago

1.6.0

1 year ago

1.5.0

2 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago