From 0036d4e515d35110963bde7522d8f1cd1fa6344a Mon Sep 17 00:00:00 2001 From: Felix Habib Date: Thu, 21 Sep 2023 15:39:51 +1000 Subject: [PATCH] Add changeset --- .changeset/wild-mayflies-vanish.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .changeset/wild-mayflies-vanish.md diff --git a/.changeset/wild-mayflies-vanish.md b/.changeset/wild-mayflies-vanish.md new file mode 100644 index 0000000..3c3fa01 --- /dev/null +++ b/.changeset/wild-mayflies-vanish.md @@ -0,0 +1,28 @@ +--- +'eslint-config-seek': minor +--- + +Adds [react/jsx-curly-brace-presence][docs] as an error. +This removes unnecessary braces around strings in props and children. + +It also enforces braces around expressions in props and children. + +[docs]: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md + +### Examples + +```diff +// Unecessary braces around string prop +- ++ +``` +```diff +// Unecessary braces around string child +- {'Hello'} ++ Hello +``` +```diff +// Mandatory braces around prop expression +-