Skip to content

Commit c582fc2

Browse files
committed
Added react/no-will-update-set-state rule.
1 parent c419247 commit c582fc2

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 2.25.0
4+
- Added react/no-will-update-set-state rule
5+
- Updated base eslint-plugin-react dependency to 7.0.0
6+
37
## 2.24.0
48
- Added best-practices/curly consistent option
59
- Added errors/no-compare-neg-zero rule

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-smartthings",
3-
"version": "2.24.0",
3+
"version": "2.25.0",
44
"description": "SmartThings's ESLint config",
55
"main": "index.js",
66
"repository": {
@@ -32,6 +32,6 @@
3232
"homepage": "https://github.com/SmartThingsOSS/eslint-config-smartthings",
3333
"peerDependencies": {
3434
"eslint": "^3.0.0",
35-
"eslint-plugin-react": "^6.0.0"
35+
"eslint-plugin-react": "^7.0.0"
3636
}
3737
}

rules/react.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ module.exports = {
117117
'react/no-unknown-property': 2,
118118
// Prevent definitions of unused prop types
119119
'react/no-unused-prop-types': [2, { customValidators: [], skipShapeProps: true }],
120+
// Prevent usage of setState in componentWillUpdate
121+
'react/no-will-update-set-state': [2, 'disallow-in-func'],
120122
// Prefer es6 class instead of createClass for React Components
121123
'react/prefer-es6-class': 2,
122124
// Enforce stateless React Components to be written as a pure function

0 commit comments

Comments
 (0)