@refiine/prettier-config
v1.1.0
Published
Sharable config for Prettier
Downloads
149
Readme
@refiine/prettier-config
Sharable config for Prettier
Installation
Install this config then run install-peerdeps to get dependencies as development dependencies.
npm install @refiine/prettier-config --save-dev
npx install-peerdeps @refiine/prettier-config --save-dev
Then add the following line to your package.json file.
{
"prettier": "@refiine/prettier-config"
}
Extending
If you wish to customise options further, remove the pettier
config from package.json and create a prettier file (/.prettierrc.js
) with the
following.
module.exports = {
...require('@refiine/prettier-config'),
tabs: true,
tabWidth: 4,
};
VSCode User?
Make sure you have Prettier extention installed and add the
following into the project's settings file (/.vscode/settings.json
) (deleting
as appropriate).
{
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.format.enable": false,
"editor.formatOnSave": true
}