Skip to content

Commit 4d6eae7

Browse files
greenkeeperio-botglebec
authored andcommitted
Update eslint-plugin-react to version 6.10.3 🚀 (#38)
* chore(package): update eslint-plugin-react to version 6.10.3 https://greenkeeper.io/ * feat(react) support 6.10.3
1 parent f23f470 commit 4d6eae7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"devDependencies": {
3535
"chai": "^3.5.0",
3636
"eslint": "~3.15.0",
37-
"eslint-plugin-react": "~6.9.0",
37+
"eslint-plugin-react": "~6.10.3",
3838
"mocha": "^3.0.0"
3939
},
4040
"peerDependencies": {

rules/react.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ module.exports = {
2727

2828
'react/display-name': 1, // Prevent missing displayName in a React component definition
2929
'react/forbid-component-props': 0, // Forbid certain props on Components
30+
'forbid-elements': 0, // Forbid certain elements
3031
'react/forbid-prop-types': 0, // Forbid certain propTypes
32+
'forbid-foreign-prop-types': 0, // Forbid foreign propTypes
3133
'react/no-array-index-key': 1, // Prevent using Array index in `key` props
3234
'react/no-children-prop': 1, // Prevent passing children as props
3335
'react/no-danger': 1, // Prevent usage of dangerous JSX properties
@@ -45,17 +47,18 @@ module.exports = {
4547
'react/no-unescaped-entities': 0, // Prevent invalid characters from appearing in markup
4648
'react/no-unknown-property': 1, // Prevent usage of unknown DOM property (fixable)
4749
'react/no-unused-prop-types': 1, // Prevent definitions of unused prop types
48-
'react/prefer-es6-class': 0, // Enforce ES5 or ES6 class for React Components
50+
'react/prefer-es6-class': 1, // Enforce ES5 or ES6 class for React Components
4951
'react/prefer-stateless-function': 1, // Enforce stateless React Components to be written as a pure function
50-
'react/prop-types': 1, // Prevent missing props validation in a React component definition
52+
'react/prop-types': 0, // Prevent missing props validation in a React component definition
5153
'react/react-in-jsx-scope': 1, // Prevent missing React when using JSX,
52-
'react/require-default-props': 1, // Enforce a defaultProps definition for every prop that is not a required prop
54+
'react/require-default-props': 0, // Enforce a defaultProps definition for every prop that is not a required prop
5355
'react/require-optimization': 0, // Enforce React components to have a shouldComponentUpdate method
5456
'react/require-render-return': 1, // Enforce ES5 or ES6 class for returning value in render function
5557
'react/self-closing-comp': 1, // Prevent extra closing tags for components without children (fixable)
5658
'react/sort-comp': 0, // Enforce component methods order
5759
'react/sort-prop-types': 0, // Enforce propTypes declarations alphabetical sorting
5860
'react/style-prop-object': 1, // Enforce style prop value being an object
61+
'void-dom-elements-no-children': 1, // Prevent void DOM elements (e.g. `<img />`, `<br />`) from receiving children
5962

6063
// JSX-specific rules
6164

0 commit comments

Comments
 (0)