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
Upgrade to Babel 7 #120
Upgrade to Babel 7 #120
Conversation
@@ -1,3 +1,3 @@ | |||
{ | |||
"presets": ["react", "es2015", "stage-0"] | |||
"presets": ["es2015", "react", "flow", "stage-0"] |
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.
The 'flow' preset is required now because it was removed from the 'react' preset.
@@ -19,7 +19,7 @@ module.exports = { | |||
'flowtype', | |||
], | |||
rules: { | |||
'array-bracket-spacing': 'off', // use babel plugin rule | |||
'array-bracket-spacing': ['error', 'never'], |
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.
The 'babel/array-bracket-spacing' rule is deprecated and suggest to use 'array-bracket-spacing'
// Required for `babel-plugin-transform-flow-strip-types` | ||
if (typeof plugin !== 'function') { | ||
plugin = plugin.default; | ||
} |
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.
The 'babel-plugin-transform-flow-strip-types' exports default
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.
I couldn't spot any regression after a quick scan :)
|
||
Object.defineProperty(Foo, "propTypes", { |
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.
Broken test? Shouldn't it remove it?
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.
How is this broken?
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.
It should remove prop types, isn't it? Am I not noticing something obvious?
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.
It shouldn't. It's here to show a limitation of the lib. It's a tradeoff taken for perf.
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.
I see, that's why it's not working for me as I expect it to. Looks like a bug to be tho.
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.
@vlad-zhukov It's related to #8
I've published this branch at |
@vlad-zhukov Let's release it :) |
@vlad-zhukov Thanks! |
Thank you! |
Upgraded tests automatically, we need to go through them to make sure they work properly.