Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Enable checkAliases for react/no-unsafe rule #302

Merged
merged 1 commit into from Jun 14, 2019
Merged

Conversation

BPScott
Copy link
Member

@BPScott BPScott commented Jun 14, 2019

By default this rule raises errors on usage of
UNSAFE_componentWillMount, UNSAFE_componentWillReceiveProps and
UNSAFE_componentWillUpdate.

Enabling checkAliases will also raise an error on usage of their
unprefixed versions too (componentWillMount, componentWillReceiveProps,
componentWillUpdate).

See https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md

(There was a brief period where these unprefixed versions triggerd the no-deprecated rule, but that was reverted as they're not actually deprecated just yet as per jsx-eslint/eslint-plugin-react#2069 and jsx-eslint/eslint-plugin-react#2075)

By default this rule raises errors on usage of
UNSAFE_componentWillMount, UNSAFE_componentWillReceiveProps and
UNSAFE_componentWillUpdate.

Enabling checkAliases will also raise an error on usage of their
unprefixed versions too (componentWillMount, componentWillReceiveProps,
componentWillUpdate).
@BPScott BPScott requested a review from cartogram June 14, 2019 19:04
@BPScott BPScott merged commit 2cf425a into master Jun 14, 2019
@alexandcote alexandcote deleted the no-unsafe-checkalias branch March 27, 2020 23:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants