-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update React to 16.3 #18768
Update React to 16.3 #18768
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,8 +118,9 @@ module.exports = { | |
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'], | ||
'react/jsx-equals-spacing': ['error', 'never'], | ||
'react/jsx-indent': ['error', 2], | ||
'react/no-did-mount-set-state': 'error', | ||
'react/no-did-update-set-state': 'error', | ||
// Off as of React 16.3, see https://github.com/yannickcr/eslint-plugin-react/issues/1754 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be a good thing to add: {
"settings": {
"react": {
"version": "16.3"
}
}
} It sounds like the solution upstream may be to noop those rules based on the React pragma version.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added that react version to the .eslintrc config in Kibana, since the |
||
'react/no-did-mount-set-state': 'off', | ||
'react/no-did-update-set-state': 'off', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason these need to be set to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. I thought we extend the recommended config, but since we didn't we can simply remove them :-) |
||
'react/no-will-update-set-state': 'error', | ||
'react/no-is-mounted': 'error', | ||
'react/no-multi-comp': ['error', { ignoreStateless: true }], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@elastic/eslint-config-kibana", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unless you're publishing this to NPM, please don't increment the version number |
||
"description": "The eslint config used by the kibana team", | ||
"main": ".eslintrc.js", | ||
"repository": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the React bump but thought I'd put it here:
Are we still trying to follow airbnb's convention (with minor modifications) or do we see our style guide as very different?
If we still intent to follow airbnb style, wouldn't it be nicer if we extended their rules? Their react rules look pretty similar:
https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/rules/react.js