mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 07:47:54 -05:00
[eslint config] [react] update eslint-plugin-react
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
"eslint": "^2.8.0",
|
||||
"eslint-plugin-jsx-a11y": "^0.6.2",
|
||||
"eslint-plugin-import": "^1.4.0",
|
||||
"eslint-plugin-react": "^4.3.0",
|
||||
"eslint-plugin-react": "^5.0.0",
|
||||
"react": "*",
|
||||
"tape": "^4.5.1",
|
||||
"parallelshell": "^2.0.0"
|
||||
@@ -55,6 +55,6 @@
|
||||
"eslint": "^2.8.0",
|
||||
"eslint-plugin-jsx-a11y": "^0.6.2",
|
||||
"eslint-plugin-import": "^1.4.0",
|
||||
"eslint-plugin-react": "^4.3.0"
|
||||
"eslint-plugin-react": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
14
packages/eslint-config-airbnb/rules/react.js
vendored
14
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -138,7 +138,7 @@ module.exports = {
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-extension.md
|
||||
'react/require-extension': [0, { 'extensions': ['.jsx'] }],
|
||||
// Require render() methods to return something
|
||||
// https://github.com/yannickcr/eslint-plugin-react/pull/502
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
|
||||
'react/require-render-return': 2,
|
||||
// Prevent extra closing tags for components without children
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
|
||||
@@ -162,9 +162,9 @@ module.exports = {
|
||||
// Prevent missing parentheses around multilines JSX
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/wrap-multilines.md
|
||||
'react/wrap-multilines': [2, {
|
||||
declaration: true,
|
||||
assignment: true,
|
||||
return: true
|
||||
'declaration': true,
|
||||
'assignment': true,
|
||||
'return': true
|
||||
}],
|
||||
},
|
||||
'settings': {
|
||||
@@ -172,6 +172,10 @@ module.exports = {
|
||||
'node': {
|
||||
'extensions': ['.js', '.jsx', '.json']
|
||||
}
|
||||
}
|
||||
},
|
||||
'react': {
|
||||
'pragma': 'React',
|
||||
'version': '0.14'
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user