Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stackbit/prettier-config
Stackbit's shareable config for Prettier
https://github.com/stackbit/prettier-config
config linting
Last synced: 10 days ago
JSON representation
Stackbit's shareable config for Prettier
- Host: GitHub
- URL: https://github.com/stackbit/prettier-config
- Owner: stackbit
- License: mit
- Created: 2019-07-31T12:35:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T08:36:34.000Z (over 2 years ago)
- Last Synced: 2024-09-26T04:43:55.501Z (about 2 months ago)
- Topics: config, linting
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@stackbit/prettier-config
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# prettier-config [![NPM version](https://img.shields.io/npm/v/@stackbit/prettier-config.svg)](https://www.npmjs.com/package/@stackbit/prettier-config)
Stackbit's [shareable config](https://prettier.io/docs/en/configuration.html#sharing-configurations) for [Prettier](https://prettier.io/)
## Installation
Install Prettier and `@stackbit/prettier-config`:
```
npm install --save-dev prettier @stackbit/prettier-config
```## Usage
Stackbit's Prettier rules come bundled in `@stackbit/prettier-config`. To enable these rules, add a `prettier` property in your `package.json`. See the [Prettier configuration docs](https://prettier.io/docs/en/configuration.html) for more details.
```json
"prettier": "@stackbit/prettier-config"
```If you don't want to use `package.json`, you can use any of the supported extensions to export a string:
```jsonc
// `.prettierrc.json`
"@stackbit/prettier-config"
``````javascript
// `prettier.config.js` or `.prettierrc.js`
module.exports = '@stackbit/prettier-config';
```## Extending
This configuration is not intended to be changed, but if you have a setup where modification is required, it is possible. Prettier does not offer an "extends" mechanism as you might be familiar from tools such as ESLint.
To extend a configuration you will need to use a `prettier.config.js` or `.prettierrc.js` file that exports an object:
```javascript
module.exports = {
...require('@stackbit/prettier-config'),
semi: false
};
```## Changelog
Changes are recorded in [`CHANGELOG.md`](CHANGELOG.md).
## License
Distributed under the MIT License. See [`LICENSE`](LICENSE) for more information.