@kelysty/prettier-config
v1.0.0
Published
Kelysty UI Prettier configuration
Downloads
1
Readme
@kelysty/prettier-config
Installation
Using npm
:
npm install --save-dev prettier @kelysty/prettier-config
Using yarn
:
yarn add --dev prettier @kelysty/prettier-config
Usage
At first you need to create .prettierrc.js
file in the root of your project
to provide configuration for Prettier.
Then you can simply put this code line inside just created config file:
// .prettierrc.js
module.exports = require('@kelysty/prettier-config');
If you want to extend / override some tweaks of imported configuration you can do it like this instead:
// .prettierrc.js
// importing base configuration
const baseConfig = require('@kelysty/prettier-config');
// spread it inside final configuration object
module.exports = {
...baseConfig,
// Example: override the semi option
semi: false,
// additional configuration goes here
}
And finally, do not forget to add script to run prettier in your package.json
"scripts": {
"prettier": "prettier '**/*.{js,md,yaml,yml,json}'",
}