Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed Sep 21, 2023
1 parent a8856ac commit 0036d4e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .changeset/wild-mayflies-vanish.md
Original file line number Diff line number Diff line change
@@ -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
- <Column width={'content'}>
+ <Column width="content">
```
```diff
// Unecessary braces around string child
- <Text>{'Hello'}</Text>
+ <Text>Hello</Text>
```
```diff
// Mandatory braces around prop expression
- <Button icon=<IconSearch />>
+ <Button icon={<IconSearch />}>
```

0 comments on commit 0036d4e

Please sign in to comment.