From 509cb240955e5fffe16b3b3630faf7a0339b5867 Mon Sep 17 00:00:00 2001 From: Lovekesh Kumar Date: Wed, 5 Oct 2022 19:14:20 +0530 Subject: [PATCH] package(prettier-config): update docs (#44620) * Fix doc for extending prettier-config in .prettierrc file * Add step for adding prettier-config in .prettierrc.js file * Add changelog --- packages/prettier-config/CHANGELOG.md | 5 +++++ packages/prettier-config/README.md | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/prettier-config/CHANGELOG.md b/packages/prettier-config/CHANGELOG.md index 9365b82ad81086..da8e9b4ec49d46 100644 --- a/packages/prettier-config/CHANGELOG.md +++ b/packages/prettier-config/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### Internal + +- Fix doc for extending the prettier config in `.prettierrc` config file. +- Add step to extend the prettier config in `.prettierrc.js` config file. + ## 2.1.0 (2022-09-21) ## 2.0.0 (2022-08-24) diff --git a/packages/prettier-config/README.md b/packages/prettier-config/README.md index 3a063843835744..b07fad62e14e63 100644 --- a/packages/prettier-config/README.md +++ b/packages/prettier-config/README.md @@ -23,7 +23,13 @@ Add this to your `package.json` file: Alternatively, add this to `.prettierrc` file: ``` -extends: ['@wordpress/prettier-config'] +"@wordpress/prettier-config" +``` + +Or add this to `.prettierrc.js` file: + +```js +module.exports = require( '@wordpress/prettier-config' ); ``` ## Contributing to this package