From aa71f0ffbabf4796736ceb5a3199708b545ce31f Mon Sep 17 00:00:00 2001 From: Hyeonjong Date: Sat, 23 Sep 2023 22:46:37 +0900 Subject: [PATCH] docs: update README.md --- README.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7cff295..b11a107 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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'], };