I went through all of the ESLint rules and noted the ones that we might want to implement.
I did my best to make sure that there's no overlap between these rules and the ones already in the recommended
sets, but some may have slipped through.
prefer-const
: https://eslint.org/docs/rules/prefer-const
react/no-access-state-in-setstate
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.mdreact/no-did-mount-set-state
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.mdreact/no-did-update-set-state
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.mdreact/no-multi-comp
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md (?)- At the very least, enable
ignoreStateless
- At the very least, enable
react/no-redundant-should-component-update
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.mdreact/no-typos
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-typos.mdreact/no-unused-prop-types
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.mdreact/no-unused-state
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-state.mdreact/no-will-update-set-state
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.mdreact/self-closing-comp
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md (?)react/sort-comp
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md TODOreact/style-prop-object
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.mdreact/jsx-pascal-case
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
prefer-template
: https://eslint.org/docs/rules/prefer-template
react/boolean-prop-naming
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.mdreact/default-props-match-prop-types
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.mdreact/no-array-index-key
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md TODOreact/require-default-props
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md TODO (?)- I know there was some push-back on this, but I still think it's worth it, considering that this reduces manual type-checking, provides a clearer API, and forces development to consider reusability.
react/jsx-handler-names
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
no-var
: https://eslint.org/docs/rules/no-varno-lonely-if
: https://eslint.org/docs/rules/no-lonely-if
react/prefer-stateless-function
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md- We should probably do this if we believe that functional components will have performance benefits.
react/void-dom-elements-no-children
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.mdreact/jsx-boolean-value
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md- Not sure if we want to take a stance
react/jsx-filename-extension
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md- This one might be too much of a pain
react/jsx-curly-brace-presence
: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md- I don't know enough about our I18n process, but this might help remind people that straight strings are not allowed (?)