[eslint config] [deps] update eslint-plugin-react

- semver-patch: `jsx-max-props-per-line` “when” set to “multiline”, but left off for now.
This commit is contained in:
Jordan Harband
2017-02-19 16:51:19 -08:00
parent 7152396219
commit bbbabf32f8
2 changed files with 20 additions and 4 deletions

View File

@@ -56,7 +56,7 @@
"eslint-find-rules": "^1.14.3",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.9.0",
"eslint-plugin-react": "^6.10.0",
"in-publish": "^2.0.0",
"react": ">= 0.13.0",
"safe-publish-latest": "^1.1.1",
@@ -66,7 +66,7 @@
"eslint": "^3.15.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-react": "^6.9.0"
"eslint-plugin-react": "^6.10.0"
},
"engines": {
"node": ">= 4"

View File

@@ -71,7 +71,8 @@ module.exports = {
// Limit maximum of props on a single line in JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
'react/jsx-max-props-per-line': ['off', { maximum: 1 }],
// TODO: enable (semver-minor)
'react/jsx-max-props-per-line': ['off', { maximum: 1, when: 'multiline' }],
// Prevent usage of .bind() in JSX props
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
@@ -118,6 +119,7 @@ module.exports = {
callbacksLast: false,
shorthandFirst: false,
shorthandLast: false,
noSortAlphabetically: false,
}],
// Prevent React to be incorrectly marked as unused
@@ -178,7 +180,7 @@ module.exports = {
// Prevent missing props validation in a React component definition
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
'react/prop-types': ['error', { ignore: [], customValidators: [] }],
'react/prop-types': ['error', { ignore: [], customValidators: [], skipUndeclared: false }],
// Prevent missing React when using JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md
@@ -304,6 +306,20 @@ module.exports = {
// Enforce a defaultProps definition for every prop that is not a required prop
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
'react/require-default-props': 'error',
'react/forbid-elements': ['off', {
forbid: [
],
}],
// Forbids using non-exported propTypes
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
'react/forbid-foreign-prop-types': 'off',
// Prevent void DOM elements from receiving children
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
// TODO: enable (semver-minor)
'react/void-dom-elements-no-children': 'off',
},
settings: {