From 6583ee037c00eff81466b180c6291a8cfa0467d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:32:06 +0100 Subject: [PATCH 1/3] feat: add new rule to override jsxSingleQuote default behaviour Set jsxSingleQuote option to true, overriding the default false value. BREAKING CHANGE: Set jsxSingleQuote option to true, overriding the default false value. --- packages/prettier-config/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/prettier-config/index.js b/packages/prettier-config/index.js index d56bbb8..c9fda9d 100644 --- a/packages/prettier-config/index.js +++ b/packages/prettier-config/index.js @@ -4,6 +4,7 @@ module.exports = { arrowParens: 'avoid', experimentalTernaries: true, + jsxSingleQuote: true, singleAttributePerLine: true, singleQuote: true, } From 95057299f76b39e741dc898d566e106d86d1bcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:33:08 +0100 Subject: [PATCH 2/3] docs: update prettier-config documentation --- packages/prettier-config/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/prettier-config/README.md b/packages/prettier-config/README.md index a057a0f..99464c5 100644 --- a/packages/prettier-config/README.md +++ b/packages/prettier-config/README.md @@ -10,6 +10,7 @@ - [Installation](#đŸ“Ļ-installation) - [Documentation](#📚-documentation) +- [Custom configuration](#📚-custom-configuration) - [Contributing](#🧩-contributing) - [Changelog](#📝-changelog) - [License](#Šī¸-license) @@ -47,6 +48,18 @@ After installing it, a `.prettierrc` file will be created automatically in the p Read the [Prettier docs][prettier-docs-link] for more information. [Here][prettier-sharing-configurations-link] you can find specific information about sharing configurations. +## 📏 Custom options + +The library customises the following options. All other options take their default value as defined [here][prettier-options-link]. + +| Option | Custom value | +| ------ | ------------ | +| [arrowParens][prettier-option-arrow-parens-link] | `'avoid'` | +| [experimentalTernaries][prettier-option-experimental-ternaries-link] | `true` | +| [jsxSingleQuote][prettier-option-jsx-single-quote-link] | `true` | +| [singleAttributePerLine][prettier-option-single-attribute-per-line-link] | `true` | +| [singleQuote][prettier-option-single-quote-link] | `true` | + ## 🧩 Contributing If you are interested in helping contribute, please open an [issue][issue-link] or [pull request][pull-request-link]. @@ -68,6 +81,12 @@ Distributed under the MIT License. See [LICENSE][license-link] for more informat [npm-link]: https://www.npmjs.com/package/@inigomarquinez/prettier-config [prettier-docs-link]: https://prettier.io [prettier-link]: https://github.com/prettier/prettier +[prettier-option-arrow-parens-link]: https://prettier.io/docs/en/options.html#arrow-function-parentheses +[prettier-option-experimental-ternaries-link]: https://prettier.io/docs/en/options.html#experimental-ternaries +[prettier-option-jsx-single-quote-link]: https://prettier.io/docs/en/options.html#jsx-quotes +[prettier-option-single-attribute-per-line-link]: https://prettier.io/docs/en/options.html#single-attribute-per-line +[prettier-option-single-quote-link]: https://prettier.io/docs/en/options.html#quotes +[prettier-options-link]: https://prettier.io/docs/en/options.html [prettier-sharing-configurations-link]: https://prettier.io/docs/en/configuration#sharing-configurations [pull-request-link]: https://github.com/inigomarquinez/base-configs/pulls From ea5eaabda6b69af3ca26899a0ce78607a00843bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:37:48 +0100 Subject: [PATCH 3/3] chore: changeset added --- .changeset/curly-jeans-laugh.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/curly-jeans-laugh.md diff --git a/.changeset/curly-jeans-laugh.md b/.changeset/curly-jeans-laugh.md new file mode 100644 index 0000000..1b99eb8 --- /dev/null +++ b/.changeset/curly-jeans-laugh.md @@ -0,0 +1,5 @@ +--- +'@inigomarquinez/prettier-config': major +--- + +Set jsxSingleQuote option to true, overriding the default false value.