Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ony3000 committed Sep 23, 2023
1 parent aa98488 commit aa71f0f
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@

A Prettier plugin that wraps verbose class name based on the `printWidth` option.

**Note**: Prettier v3 is not yet supported.

![A use case for this plugin.](.github/banner.png)

## Installation

```sh
npm install -D prettier@~2.8 prettier-plugin-classnames
npm install -D prettier prettier-plugin-classnames
```

```sh
yarn add -D prettier@~2.8 prettier-plugin-classnames
yarn add -D prettier prettier-plugin-classnames
```

```sh
pnpm add -D prettier@~2.8 prettier-plugin-classnames
pnpm add -D prettier prettier-plugin-classnames
```

## Configuration
Expand All @@ -32,11 +30,21 @@ JSON:
}
```

JS:
JS (CommonJS module):

```javascript
module.exports = {
plugins: [require('prettier-plugin-classnames')],
plugins: ['prettier-plugin-classnames'],
customAttributes: ['className'],
customFunctions: ['classNames'],
};
```

JS (ES module):

```javascript
export default {
plugins: ['prettier-plugin-classnames'],
customAttributes: ['className'],
customFunctions: ['classNames'],
};
Expand Down

0 comments on commit aa71f0f

Please sign in to comment.