Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit a148aa3

Browse files
rueckstiessimlucas
authored andcommitted
update react rules, rule definition changed. (#32)
1 parent 3fa4ffb commit a148aa3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

react.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
// Prevent usage of dangerous JSX properties
3838
'react/no-danger': 0,
3939
// Prevent usage of setState in componentDidMount
40-
'react/no-did-mount-set-state': [2, 'allow-in-func'],
40+
'react/no-did-mount-set-state': 2,
4141
// Prevent usage of setState in componentDidUpdate
4242
'react/no-did-update-set-state': 2,
4343
// Prevent multiple component definition per file
@@ -51,7 +51,9 @@ module.exports = {
5151
// Restrict file extensions that may be required
5252
'react/require-extension': 0,
5353
// Prevent extra closing tags for components without children
54-
'react/self-closing-comp': 2,
54+
'react/self-closing-comp': [2, {
55+
component: true
56+
}],
5557
// Enforce component methods order
5658
'react/sort-comp': [2, {
5759
order: [

0 commit comments

Comments
 (0)