Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys91 authored Feb 2, 2024
1 parent 95ac24e commit bf878f5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@

# prettier-config-dangl

[Prettier](https://prettier.io/) configuration used in Dangl projects.


## Installation

Install as a dev dependency (along with [Prettier](https://prettier.io/)) via [npm](https://www.npmjs.com/):



```bash
npm install --save-dev @dangl/prettier-config-dangl prettier@latest @trivago/prettier-plugin-sort-imports
```

## Usage
1. Create a file named `prettier.config.js` with the following contents:
```javascript
'use strict';

module.exports = require("@dangl/prettier-config-dangl");
```

2. Add a [Prettier](https://prettier.io/) script to `package.json`:
```json
{
"scripts": {
"prettier": "prettier --write \"**/*.js\""
}
}
```
> Adjust the glob pattern as needed to include more file extensions. For example, \"**/*.{js,ts}\" will format both JavaScript and TypeScript files. Files can be excluded with a .prettierignore file.

0 comments on commit bf878f5

Please sign in to comment.