chore: Enable and fix @eslint-react/no-unstable-default-props#1989
chore: Enable and fix @eslint-react/no-unstable-default-props#1989
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
E2E Test Results✅ All tests passed • 126 passed • 3 skipped • 1077s
Tests ran across 4 shards in parallel. |
143773c to
ac166b5
Compare
PR Review✅ No critical issues found. The changes correctly fix
One minor note (not blocking): The The |
Summary
This PR
eslint-config-reactwith the modernized equivalent@eslint-react/eslint-plugin. Note thateslint-config-reactwas not actually enabled previously, as none of its rules were added to the eslint config.no-unstable-default-propsrule and fixes existing violations. This rule catches components with optional props of unstable types (objects, arrays) which have a default value assigned. The default value changes on each render, which can cause unecessary re-renders and re-computations of useMemos and useEffects.We can enable more rules from this plugin in future PRs.
Screenshots or video
There are no expected behavior changes
How to test locally or on Vercel
The app can be regression tested in the preview environment.
References