@telefonica/prettier-config

2.0.0 • Public • Published

prettier-config

Install

Add prettier and this package to your devDependencies

yarn add --dev prettier @telefonica/prettier-config

or

npm i --save-dev prettier @telefonica/prettier-config

Usage

Add to your package.json:

"prettier": "@telefonica/prettier-config"

Configure pre-commit hook

You may want to configure a pre-commit hook, to enforce code style on commit.

You will need to add two dev dependencies: husky and lint-staged:

yarn add --dev husky lint-staged

or

npm i --save-dev husky lint-staged

Then add the following configuration to your package.json:

"husky": {
    "hooks": {
        "pre-commit": "lint-staged"
    }
},
"lint-staged": {
    "*.{ts,tsx,js,json,md,yml,yaml}": [
        "prettier --write"
    ]
}

Contribute

Please, open an issue if you want to discuss a rule or add a new configuration

Readme

Keywords

none

Package Sidebar

Install

npm i @telefonica/prettier-config

Weekly Downloads

564

Version

2.0.0

License

UNLICENSED

Unpacked Size

1.96 kB

Total Files

4

Last publish

Collaborators

  • tdaf
  • aura
  • living-apps
  • lifecyle-novum