Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kelysty/prettier-config
Common Prettier configuration
https://github.com/kelysty/prettier-config
config prettier
Last synced: 19 days ago
JSON representation
Common Prettier configuration
- Host: GitHub
- URL: https://github.com/kelysty/prettier-config
- Owner: Kelysty
- License: mit
- Created: 2023-11-24T01:44:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-24T05:55:05.000Z (about 1 year ago)
- Last Synced: 2024-04-24T16:24:21.617Z (9 months ago)
- Topics: config, prettier
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @kelysty/prettier-config
## Installation
Using `npm`:
```bash
npm install --save-dev prettier @kelysty/prettier-config
```
Using `yarn`:
```bash
yarn add --dev prettier @kelysty/prettier-config
```## Usage
At first you need to create `.prettierrc.js` file in the root of your project
to provide configuration for Prettier.Then you can simply put this code line inside just created config file:
```js
// .prettierrc.jsmodule.exports = require('@kelysty/prettier-config');
```**If** you want to extend / override some tweaks of imported configuration
you can do it like this instead:```js
// .prettierrc.js// importing base configuration
const baseConfig = require('@kelysty/prettier-config');// spread it inside final configuration object
module.exports = {
...baseConfig,// Example: override the semi option
semi: false,// additional configuration goes here
}
```And finally, do not forget to **add script to run prettier** in your package.json
```json
"scripts": {
"prettier": "prettier '**/*.{js,md,yaml,yml,json}'",
}
```