From 7b01d4993ebe6dde1e8fb9ac87df6a30fa22104c Mon Sep 17 00:00:00 2001 From: Greg Tatum Date: Fri, 10 Aug 2018 14:28:16 -0500 Subject: [PATCH] Disable react/prop-types eslint rule We check Props using Flow types, and we have complete coverage of the components using Flow. The eslint rule can't figure out every combination of Flow types, especially around things like object spread types. This commit disables the rule, to only rely on the Flow types, and not have to worry about false negatives reported by the react/prop-types rule. --- .eslintrc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 51b79046b8..348682e98d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,6 +37,9 @@ module.exports = { 'react/no-redundant-should-component-update': 'error', 'react/no-this-in-sfc': 'error', 'react/no-typos': 'error', + // Flow provides enough coverage over the prop types, and there can be errors + // with some of the more complicated Flow types. + 'react/prop-types': 'off', "react/jsx-curly-brace-presence": ['error', { "props": 'never', "children": 'never' }], // `no-unused-prop-types` is buggy when we use destructuring parameters in // functions as it misunderstands them as functional components.