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 (?)