Skip to content

Commit

Permalink
Disable react/prop-types eslint rule
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gregtatum committed Aug 20, 2018
1 parent 9409021 commit 7b01d49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7b01d49

Please sign in to comment.