From 43fcc99d9a6afe8de30fb367ce80acee95e4b929 Mon Sep 17 00:00:00 2001 From: Mark Skelton Date: Wed, 16 Mar 2022 12:45:16 -0500 Subject: [PATCH] Add rule (#10) --- .changeset/fast-boats-begin.md | 6 ++++++ packages/eslint-config-widen/src/react.ts | 1 + 2 files changed, 7 insertions(+) create mode 100644 .changeset/fast-boats-begin.md diff --git a/.changeset/fast-boats-begin.md b/.changeset/fast-boats-begin.md new file mode 100644 index 0000000..e5c95a9 --- /dev/null +++ b/.changeset/fast-boats-begin.md @@ -0,0 +1,6 @@ +--- +'eslint-config-widen': minor +--- + +Enable the `react/jsx-curly-brace-presence` rule to automatically remove +unnecessary braces from JSX props. diff --git a/packages/eslint-config-widen/src/react.ts b/packages/eslint-config-widen/src/react.ts index dee6bbe..c749e61 100644 --- a/packages/eslint-config-widen/src/react.ts +++ b/packages/eslint-config-widen/src/react.ts @@ -37,6 +37,7 @@ export = { 'react/button-has-type': 'warn', // https://reactjs.org/docs/jsx-in-depth.html#props-default-to-true 'react/jsx-boolean-value': ['warn', 'always'], + 'react/jsx-curly-brace-presence': ['warn', 'never'], 'react/jsx-first-prop-new-line': ['error', 'multiline'], 'react/jsx-no-duplicate-props': 'error', 'react/jsx-sort-props': [