Skip to content

Commit

Permalink
lint: Disable react/static-property-placement before buggy upgrade
Browse files Browse the repository at this point in the history
Starting in version 7.31.9 of eslint-plugin-react, this rule has
a bug where it talks about `contextTypes` when in reality we don't
have and never want a `contextTypes`:
  jsx-eslint/eslint-plugin-react#3467

Just disable the rule -- it's not a valuable enough rule to spend
effort hacking around the bug.
  • Loading branch information
gnprice authored and BrandonNgoranNtam committed Nov 22, 2022
1 parent a3191ea commit 7641ea2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .eslintrc.yaml
Expand Up @@ -128,10 +128,11 @@ rules:
# better aligns with our practices in JS proper (not JSX).
react/jsx-curly-newline: off

# Enforce `static` class property syntax.
react/static-property-placement:
- error
- static public field
# This rule has a bug that causes annoying irrelevant messages:
# https://github.com/jsx-eslint/eslint-plugin-react/issues/3467
# The rule isn't important enough to be worth hacking around,
# especially now that we have few remaining class components.
react/static-property-placement: off

# Enforce state initialization style (never in constructor)
react/state-in-constructor:
Expand Down

0 comments on commit 7641ea2

Please sign in to comment.