2023-05-25 22:13:17 -07:00
|
|
|
---
|
2025-04-18 19:19:20 +02:00
|
|
|
title: '@freesewing/prettier-config'
|
2023-05-25 22:13:17 -07:00
|
|
|
---
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
FreeSewing's **prettier-config** package holds FreeSewing's preferred
|
|
|
|
configuration for the [Prettier](https://prettier.io/) code formatter.
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
It is published on NPM as [@freesewing/prettier-config
|
|
|
|
](https://www.npmjs.com/package/@freesewing/prettier-config).\
|
|
|
|
The source code for this package is available in [our monorepo on Codeberg
|
|
|
|
](https://codeberg.org/freesewing/freesewing) under [packages/prettier-config
|
|
|
|
](https://codeberg.org/freesewing/freesewing/src/branch/develop/packages/prettier-config).
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
This package only provides a default export, which is a JSON file.
|
|
|
|
|
|
|
|
To use it, do not install it, but instead update you `package.json` file as such:
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
// ...
|
|
|
|
"prettier": "@freesewing/prettier-config"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Prettier options
|
|
|
|
|
|
|
|
The Prettier options configured by this package:
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
| Option | Value |
|
|
|
|
| ------------- | ------- |
|
|
|
|
| semi | `false` |
|
|
|
|
| singleQuote | `true` |
|
|
|
|
| trailingComma | "es5" |
|
|
|
|
| printWidth | 100 |
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::note RELATED
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
Please see the
|
|
|
|
[Prettier options documentation](https://prettier.io/docs/en/options.html)
|
|
|
|
for information about the effects of each option.
|
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
[1]: https://www.npmjs.com/package/@freesewing/prettier-config
|