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

refactor: use option-validator in preset-typescript #12347

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Nov 11, 2020

Q                       A
Tests Added + Pass? Yes
Any Dependency Changes? @babel/preset-typescript now depends on @babel/helper-validator-option
License MIT

This PR is extracted from #10927. It targets to current main.

In another PR, I plan to re-introduce #10927 behind a flag (tentatively named as BABEL_8_PRESET_OPTION_CHECK) like we did in #11172, so it is non-breaking change (not if you randomly assign BABEL_8_* env in your CI) and we can merge without holding off for a long while.

@JLHwung JLHwung added the PR: Polish 💅 A type of pull request used for our changelog categories label Nov 11, 2020
@@ -29,12 +29,6 @@ export default declare((api, opts) => {
const development = !!opts.development;
const useBuiltIns = !!opts.useBuiltIns;

if (typeof development !== "boolean") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is unreachable, we have cast development to boolean by double negation above.

@babel-bot
Copy link
Collaborator

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

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: Disable whitespace changes when reviewing

@codesandbox-ci
Copy link

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 4c023d8:

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

@nicolo-ribaudo nicolo-ribaudo merged commit 2e3eec6 into babel:main Nov 20, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the use-validator-option-in-preset-typescript branch November 20, 2020 14:11
nicolo-ribaudo pushed a commit to nicolo-ribaudo/babel that referenced this pull request Dec 2, 2020
@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 Feb 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants