https://github.com/zaherg/prettier-config
My personal prettier config (my first npm package)
https://github.com/zaherg/prettier-config
code-formatting npm personal-config prettier-config
Last synced: about 2 months ago
JSON representation
My personal prettier config (my first npm package)
- Host: GitHub
- URL: https://github.com/zaherg/prettier-config
- Owner: zaherg
- License: mit
- Created: 2024-05-12T14:28:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-02T04:24:42.000Z (12 months ago)
- Last Synced: 2025-03-05T10:06:53.863Z (3 months ago)
- Topics: code-formatting, npm, personal-config, prettier-config
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@zaher/prettier-config
- Size: 172 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Prettier Config
This is my personal prettier configuration that I use most of the time, feel free to use it or create your own based on it.
### Included plugins
For easy use, I have included multiple prettier plugins, you can visit each if you want to configure them:
1. [Sort imports](https://github.com/trivago/prettier-plugin-sort-imports)
2. [Prisma](https://github.com/umidbekk/prettier-plugin-prisma)
3. [toml](https://github.com/un-ts/prettier/tree/master/packages/toml)
4. [Tailwindcss plugin](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/)You can check each one of them to know what options you can use and how to use them.
### Usage
#### Via package.json
To use it:
1. Install the package `npm install @zaher/prettier-cofig --save-dev`
2. Update your `package.json` file, and add the following to it:```json
{
// ...
"prettier": "@zaher/prettier-config"
}
```#### Extending the config
If you want to update any of the config while keeping the other one you can create your own `.prettierrc.js` file and require this package within it, then update the one you want to change, like
```javascript
module.exports = {
...require('@zaher/prettier-config'),
// Override values here
};
```This way your local file will be picked up automatically, while also using the other values from the package (where the local file imports and spreads the config from the package) .
This package is released under the [MIT licnese](./LICENSE)