Skip to content

Commit 56a3aaa

Browse files
chambo-ephilibea
andauthored
feat(eslint-config-react): enforce class fields for react class (#636)
Co-authored-by: philibeaux <[email protected]>
1 parent 0367d8a commit 56a3aaa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/eslint-config-react/shared.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ module.exports = {
6161
'react/no-adjacent-inline-elements': 'error', // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
6262
'prefer-object-has-own': 'error', // https://eslint.org/docs/rules/prefer-object-has-own
6363

64+
// We don't use babel-preset-airbnb so we can make those changes
65+
'react/static-property-placement': ['error', 'static public field'],
66+
'react/state-in-constructor': ['error', 'never'],
67+
6468
// To have consistent ordering in proptypes
6569
'react/sort-prop-types': [
6670
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md

0 commit comments

Comments
 (0)