From 8ba27f54878a591173c554deb4c7ce4f0a554491 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 11 May 2021 10:12:56 -0700 Subject: [PATCH] Enable react/jsx-boolean-value rule Summary: This checks for unnecessary boolean assignments in JSX, e.g. `grow={true}` which can just be `grow`. Saw this because mweststrate commented this on a diff. Reviewed By: mweststrate Differential Revision: D28329647 fbshipit-source-id: ed408a0d4977315cdd0ff2d13024bb720c27e24a --- desktop/.eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js index cb552a562..5acab8321 100644 --- a/desktop/.eslintrc.js +++ b/desktop/.eslintrc.js @@ -49,6 +49,8 @@ module.exports = { 'flowtype/define-flow-type': 0, 'flowtype/use-flow-type': 0, 'react/react-in-jsx-scope': 0, // not needed with our metro implementation + // Disallow boolean JSX properties set to true, e.g. `grow={true}`. + 'react/jsx-boolean-value': ['warn', 'never'], 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'react/jsx-key': 'error',