3.3.2 • Published 2 years ago
@pisyukaev/prettier-config v3.3.2
@pisyukaev/prettier-config
Here is my personal Prettier config.
Install
npm install @pisyukaev/prettier-config -Dyarn add @pisyukaev/prettier-config -Dpnpm add @pisyukaev/prettier-config -DUsage
// .prettierrc.cjs
module.exports = require('@pisyukaev/prettier-config')Copy the ignore file to your project folder
If you want to extend the ignore file, run the following command in the root of your project folder:
# unix
cp node_modules/@pisyukaev/prettier-config/.prettierignore .prettierignore
# windows
copy node_modules/@pisyukaev/prettier-config/.prettierignore .prettierignoreIt will copy the .prettierignore from @pisyukaev/prettier-config to your project root folder.
Scripts
Some commonly used scripts in package.json.
{
"scripts": {
"format": "prettier --write '**/*.{js,ts,tsx,json}'",
}
}Related
- Prettier - an opinionated code formatter.
- Prettier - Sharing configurations - Document on sharing prettier configurations.
- Prettier - Ignore Code - Use
.prettierignoreto ignore certain files and folders completely. - prettier-plugin-sort-imports - A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.
- prettier-plugin-multiline-arrays - Prettier plugin to force array elements to wrap onto new lines.