From 36ad54e8ce65a40c5d93ad86d935016fbc5d5b1e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 23:41:49 +0100 Subject: [PATCH] release: 3.2.0 (#370) Co-authored-by: github-actions[bot] --- .changeset/thick-snakes-float.md | 15 --------------- CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 .changeset/thick-snakes-float.md diff --git a/.changeset/thick-snakes-float.md b/.changeset/thick-snakes-float.md deleted file mode 100644 index 5ea3bfac..00000000 --- a/.changeset/thick-snakes-float.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"types-react-codemod": minor ---- - -Add `no-implicit-ref-callback-return` transform - -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 --
(instance = current)} /> -+
{instance = current}} /> -``` - -The transform is opt-in in the `preset-19` in case you already used ref cleanups in Canary releases. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8111c0f8..edce61b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + -
(instance = 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 diff --git a/package.json b/package.json index e102f74e..152ca81a 100644 --- a/package.json +++ b/package.json @@ -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",