Files
Mathias StangandGitHub 562f17efab docs(eslint-plugin-react-hooks): add changelog for 5.1.0 & 5.2.0 (#32536)
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

Adds changelog entries for the last two minor releases of
`eslint-plugin-react-hooks`. Fixes #31717.

I chose to not include #31208 (8382581446)
and #32115 (fd2d279984) in the changelog
as they only changed internals that do not affect consumers of the
plugin, and it doesn't seem like the changelog previously included such
changes.

Changes are sorted by importance (rather than by commit date), with the
most important changes first.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

Docs only, nothing to test.
2025-03-06 13:58:39 -05:00

9.3 KiB
Raw Permalink Blame History

5.2.0

5.1.0

  • Add support for do/while loops (@tyxla in #28714)
  • Fix error when callback argument is an identifier with an as expression (@mskelton in #31119)

5.0.0

  • New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means _Button or _component are no longer valid. (@kassens) in #25162

4.6.0

4.5.0

  • Fix false positive error with large number of branches. (@scyron6 in #24287)

4.4.0

  • No changes, this was an automated release together with React 18.

4.3.0

4.2.0

  • No changes, this was an automated release together with React 17.

4.1.2

4.1.1

4.1.0

4.0.8

  • Fixes TypeScript typeof annotation to not be considered a dependency. (@delca85 in #19316)

4.0.7

4.0.6

4.0.5

  • Fix a crash when the dependency array has an empty element. (@yeonjuan in #19145)
  • Fix a false positive warning that occurs with optional chaining. (@fredvollmer in #19061)

4.0.4

4.0.3

  • Remove the heuristic that checks all Hooks ending with Effect due to too many false positives. (@gaearon in #19004)

4.0.2

  • Prevent Hooks that have Effect in the middle from being considered effects. (@surgeboris in #18907)

4.0.1

4.0.0

  • New Violations: Consider PascalCase.useFoo() calls as Hooks. (@cyan33 in #18722)
  • New Violations: Check callback body when it's not written inline. (@gaearon in #18435)
  • New Violations: Check dependencies for all Hooks ending with Effect. (@airjp73 in #18580)
  • Add a way to enable the dangerous autofix. (@gaearon in #18437)
  • Offer a more sensible suggestion when encountering an assignment. (@Zzzen in #16784)
  • Consider TypeScript casts of useRef as constant. (@sophiebits in #18496)
  • Add documentation. (@ghmcadams in #16607)

3.0.0

2.5.0

2.4.0

  • New Violations: Run checks for functions passed to forwardRef. (@dprgarner in #17255)
  • New Violations: Check for ref usage in any Hook containing the word Effect. (@gaearon in #17663)
  • Disable dangerous autofix and use ESLint Suggestions API instead. (@wdoug in #17385)

2.0.0

1.x

The 1.x releases arent noted in this changelog, but you can find them in the commit history.