Skip to content

[babel 8] type checking preset-flow options#12751

Merged
nicolo-ribaudo merged 5 commits intobabel:mainfrom
JLHwung:type-checking-preset-flow-options
Mar 25, 2021
Merged

[babel 8] type checking preset-flow options#12751
nicolo-ribaudo merged 5 commits intobabel:mainfrom
JLHwung:type-checking-preset-flow-options

Conversation

@JLHwung
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

export default function normalizeOptions(options = {}) {
let { all } = options;
const { allowDeclareFields } = options;
Copy link
Copy Markdown
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
Copy Markdown
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
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants