Skip to content

Commit

Permalink
release: 3.2.0 (#370)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Mar 20, 2024
1 parent 7535bfc commit 36ad54e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
15 changes: 0 additions & 15 deletions .changeset/thick-snakes-float.md

This file was deleted.

16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# types-react-codemod

## 3.2.0

### Minor Changes

- Add `no-implicit-ref-callback-return` transform ([#369](https://github.com/eps1lon/types-react-codemod/pull/369) [`7535bfc`](https://github.com/eps1lon/types-react-codemod/commit/7535bfcd568806578460f97390a88368b25bdeb8) by [@eps1lon](https://github.com/eps1lon))

Ensures you don't accidentally return anything from ref callbacks since the return value was always ignored.
With ref cleanups, this is no longer the case and flagged in types to avoid mistakes.

```diff
-<div ref={current => (instance = current)} />
+<div ref={current => {instance = current}} />
```

The transform is opt-in in the `preset-19` in case you already used ref cleanups in Canary releases.

## 3.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "types-react-codemod",
"version": "3.1.1",
"version": "3.2.0",
"bin": "bin/types-react-codemod.cjs",
"scripts": {
"format": "prettier . --write",
Expand Down

0 comments on commit 36ad54e

Please sign in to comment.