1.0.1 • Published 1 year ago
@isfawwaz/prettier-config v1.0.1
@isfawwaz/prettier-config
Shared Prettier config for my projects.
Installation
npm install --save-dev @isfawwaz/prettier-config
# or
pnpm add -D @isfawwaz/prettier-config
# or
yarn add -D @isfawwaz/prettier-config
Usage
On package.json
Add this to your package.json
:
{
"prettier": "@isfawwaz/prettier-config"
}
Different files
If you don’t want to use package.json, you can use any of the supported extensions to export a string, e.g. .prettierrc.json:
"@isfawwaz/prettier-config"
Note: This method does not offer a way to extend the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a .prettierrc.js file and export the modifications, e.g:
module.exports = {
...require('@isfawwaz/prettier-config'),
};