Skip to content
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

Merged
merged 5 commits into from Mar 25, 2021

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Feb 3, 2021

Q                       A
Major: Breaking Change? Y, behind the BABEL_8_BREAKING flag
Tests Added + Pass? Yes
Any Dependency Changes? preset-flow now depends on helper-validator-option
Documentation PR Link babel/website#2765
License MIT

This PR was derived from #10927. It focuses on checking @babel/preset-flow options only.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 3, 2021

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:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@babel-bot
Copy link
Collaborator

babel-bot commented Feb 3, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/44749/

@JLHwung JLHwung force-pushed the type-checking-preset-flow-options branch from 4d55abd to ff5d3a6 Compare February 3, 2021 15:47
@JLHwung JLHwung mentioned this pull request Feb 3, 2021
34 tasks
@JLHwung JLHwung added this to the Babel 8.0 milestone Feb 3, 2021
return { all };
}

return {
Copy link
Member

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? 🙏

@JLHwung JLHwung force-pushed the type-checking-preset-flow-options branch from 39a4e4f to e188d7f Compare March 25, 2021 19:00
@JLHwung JLHwung added this to To review in Nicolò's ideal PR review order list via automation Mar 25, 2021

export default function normalizeOptions(options = {}) {
let { all } = options;
const { allowDeclareFields } = options;
Copy link
Member

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?

Copy link
Member

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.

@nicolo-ribaudo nicolo-ribaudo changed the title breaking: type checking preset-flow options [babel 8] type checking preset-flow options Mar 25, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit 16d8300 into babel:main Mar 25, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the type-checking-preset-flow-options branch March 25, 2021 23:33
Nicolò's ideal PR review order list automation moved this from To review to Done Mar 25, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jun 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release and removed babel 8 labels Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: flow outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release
Development

Successfully merging this pull request may close these issues.

None yet

4 participants