From 7641ea21890b2c0414d8f8acb372b94d31769121 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 8 Nov 2022 12:16:29 -0800 Subject: [PATCH] lint: Disable react/static-property-placement before buggy upgrade 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`: https://github.com/jsx-eslint/eslint-plugin-react/issues/3467 Just disable the rule -- it's not a valuable enough rule to spend effort hacking around the bug. --- .eslintrc.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 9df70397853..d1866bf6507 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -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: