Prettier Config
A shared Prettier config for all the @mxjoly packages.
Installation
yarn add --dev @mxjoly/prettier-config
npm install --save-dev @mxjoly/prettier-config
Setup
If you want to use this config as base in any of your projects, you need to create a .prettierrc.js
file in your project folder that re-exports the Prettier config from @mxjoly/prettier-config
.
You can either do that automatically by running the following command in the root folder of your project (where your package.json
is):
# create .prettierrc.js config file
npm @mxjoly/prettier-config
or by manually adding the following content:
module.exports = require('@mxjoly/prettier-config');
Important: filename must be .prettierrc.js
or prettier.config.js
or otherwise Prettier will try to parse it as JSON or YML and will fail.
Read the Prettier docs on sharing configurations for more info.