https://github.com/crashmax-dev/prettier-config
✒ Here is my personal Prettier config.
https://github.com/crashmax-dev/prettier-config
config formatter prettier typescript
Last synced: 2 months ago
JSON representation
✒ Here is my personal Prettier config.
- Host: GitHub
- URL: https://github.com/crashmax-dev/prettier-config
- Owner: crashmax-dev
- License: mit
- Created: 2022-06-20T16:06:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-05T09:15:44.000Z (over 1 year ago)
- Last Synced: 2025-04-09T20:03:31.381Z (3 months ago)
- Topics: config, formatter, prettier, typescript
- Language: JavaScript
- Homepage: https://npm.im/@crashmax/prettier-config
- Size: 77.1 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `@crashmax/prettier-config`
> Here is my personal [Prettier](https://prettier.io) config.
## Install
```sh
npm install @crashmax/prettier-config -D
``````sh
yarn add @crashmax/prettier-config -D
``````sh
pnpm add @crashmax/prettier-config -D
```## Usage
```js
// .prettierrc.cjs
module.exports = require('@crashmax/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:
```bash
# unix
cp node_modules/@crashmax/prettier-config/.prettierignore .prettierignore# windows
copy node_modules/@crashmax/prettier-config/.prettierignore .prettierignore
```It will copy the `.prettierignore` from `@crashmax/prettier-config` to your project root folder.
### Scripts
Some commonly used scripts in `package.json`.
```json
{
"scripts": {
"format": "prettier --write \"**/*.{js,ts,tsx,json}\""
}
}
```## Related
- [Prettier](https://github.com/prettier/prettier) - an opinionated code formatter.
- [Prettier - Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations) - Document on sharing prettier configurations.
- [Prettier - Ignore Code](https://prettier.io/docs/en/ignore.html) - Use `.prettierignore` to ignore certain files and folders completely.
- [prettier-plugin-sort-imports](https://github.com/ianvs/prettier-plugin-sort-imports) - A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.
- [prettier-plugin-multiline-arrays](https://github.com/electrovir/prettier-plugin-multiline-arrays) - Prettier plugin to force array elements to wrap onto new lines.