Skip to content

Commit de867d9

Browse files
greenkeeperio-botglebec
authored andcommitted
Update eslint-plugin-react to version 7.0.1 🚀 (#42)
* chore(package): update eslint-plugin-react to version 7.0.1 https://greenkeeper.io/ * feat(react): support eslint-plugin-react 7.0.1
1 parent 739ed3b commit de867d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
"devDependencies": {
3535
"chai": "^3.5.0",
3636
"eslint": "~3.19.0",
37-
"eslint-plugin-react": "~6.10.3",
37+
"eslint-plugin-react": "~7.0.1",
3838
"mocha": "^3.0.0"
3939
},
4040
"peerDependencies": {
41-
"eslint": ">=3.12.1",
42-
"eslint-plugin-react": ">=6.8.0"
41+
"eslint": ">=3.19.0",
42+
"eslint-plugin-react": ">=7.0.1"
4343
}
4444
}

rules/react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module.exports = {
4747
'react/no-unescaped-entities': 0, // Prevent invalid characters from appearing in markup
4848
'react/no-unknown-property': 1, // Prevent usage of unknown DOM property (fixable)
4949
'react/no-unused-prop-types': 1, // Prevent definitions of unused prop types
50+
'react/no-will-update-set-state': 2, // Prevent usage of `setState` in `componentWillUpdate`
5051
'react/prefer-es6-class': 1, // Enforce ES5 or ES6 class for React Components
5152
'react/prefer-stateless-function': 1, // Enforce stateless React Components to be written as a pure function
5253
'react/prop-types': 0, // Prevent missing props validation in a React component definition
@@ -78,10 +79,9 @@ module.exports = {
7879
'react/jsx-no-duplicate-props': 1, // Prevent duplicate props in JSX
7980
'react/jsx-no-literals': 0, // Prevent usage of unwrapped JSX strings
8081
'react/jsx-no-target-blank': 1, // Prevent usage of unsafe target='_blank'
81-
'react/jsx-no-undef': 1, // Disallow undeclared variables in JSX
82+
'react/jsx-no-undef': [1, { allowGlobals: true }], // Disallow undeclared variables in JSX
8283
'react/jsx-pascal-case': 1, // Enforce PascalCase for user-defined JSX components
8384
'react/jsx-sort-props': 0, // Enforce props alphabetical sorting
84-
'react/jsx-space-before-closing': 0, // Validate spacing before closing bracket in JSX (fixable)
8585
'react/jsx-tag-spacing': 1, // Validate whitespace in and around the JSX opening and closing brackets (fixable)
8686
'react/jsx-uses-react': 1, // Prevent React to be incorrectly marked as unused
8787
'react/jsx-uses-vars': 1, // Prevent variables used in JSX to be incorrectly marked as unused

0 commit comments

Comments
 (0)