@mels/prettier-config
Shareable Prettier configuration.
Install • How To Use • Credits • License
✨ Features
This package contains all my Prettier rules as a shareable configuration.
Install
With npm:
npm install @mels/prettier-config --save-dev
With yarn:
yarn add @mels/prettier-config --dev
How To Use
You can use this config in multiple ways, depending on your preference.
Reference it in your package.json
using the prettier
property:
{
"name": "some-lib",
"version": "0.0.0",
"prettier": "@mels/prettier-config"
}
Use any of the supported extensions to export a string:
// .prettierrc.json
'@mels/prettier-config';
// prettier.config.js or .prettierrc.js
module.exports = '@mels/prettier-config';
If you need to extend the config, you can do so with .prettierrc.js
or prettier.config.js
and export the modifications in an object:
// prettier.config.js or .prettierrc.js
module.exports = {
...require('@mels/prettier-config'), // import the package
semi: false, // add modifications
};
Credits
- Toolkit logo by Creatype from www.flaticon.com
License
MIT