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
[babel 8] type checking preset-flow options #12751
[babel 8] type checking preset-flow options #12751
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c4e7b1e:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/44749/ |
4d55abd
to
ff5d3a6
Compare
return { all }; | ||
} | ||
|
||
return { |
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.
Could you use if/else
instead of the early return, so that it's easier to automate the removal of process.env.BABEL_8_BREAKING
? 🙏
39a4e4f
to
e188d7f
Compare
|
||
export default function normalizeOptions(options = {}) { | ||
let { all } = options; | ||
const { allowDeclareFields } = options; |
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.
nbd, maybe just do one var declaration?
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.
ESLint will complain, because one has let
and one has const
.
BABEL_8_BREAKING
flagpreset-flow
now depends onhelper-validator-option
This PR was derived from #10927. It focuses on checking
@babel/preset-flow
options only.