New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust no-unsafe
rule to handle all unsafe life-cycle methods
#2075
Conversation
- Adjust `no-unsafe` rule to handle all unsafe life-cycle methods including their aliases. - Add instructions on updating components to be consistent with React runtime warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we could avoid a breaking change by adding the non-prefixed methods behind an option (and later, enable that option by default as a breaking change).
Avoid breaking changes by adding the non-prefixed methods behind the option
@ljharb The breaking changes are hidden behind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Really like the new instructions of what method to migrate to. Good touch!
The original PR has been broken down to 2 parts, the changes related to
no-unsafe
rule have been moved to this PR.Summary
no-unsafe
rule has been adjusted to handle all unsafe life-cycle methods including their aliases. Developers who want to avoid using of legacy lifecycle methods can enable it today.no-unsafe
rule to be consistent with React runtime warnings.