@wayofdev/prettier-config

1.1.0 • Public • Published

Prettier Config

Shareable prettier configuration.

Install

# using yarn
$ yarn add -D prettier @wayofdev/prettier-config

# using pnpm
$ pnpm add -Dw prettier @wayofdev/prettier-config

Usage

.prettierrc.js

module.exports = '@wayofdev/prettier-config';

Extending

.prettierrc.js

module.exports = {
    ...require('@wayofdev/prettier-config'),
    semi: false,
};

Add an NPM Script

Running this command:

npm set-script lint:prettier "prettier --write ."

Will create:

package.json

...
"scripts": {
    ...
    "lint:prettier": "prettier --write ."
    ...
},
...

Add a Pre-commit Hook

lint-staged.config.js

module.exports = {
    '**/*': ['prettier --cache --write --ignore-unknown'],
};

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @wayofdev/prettier-config

      Weekly Downloads

      0

      Version

      1.1.0

      License

      MIT

      Unpacked Size

      4.8 kB

      Total Files

      6

      Last publish

      Collaborators

      • lotyp