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

throw an error if anyone sets skipBabel #2247

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mansona
Copy link
Member

@mansona mansona commented Feb 2, 2025

This is part of #2207

This PR adds an error whenever someone still has the skipBabel config set. This setting has already been removed in #2102 and this error is just informing people that they should remove the setting since it no longer does anything.

@@ -107,6 +107,11 @@ export type CoreOptionsType = Required<
Pick<Options, 'staticHelpers' | 'staticModifiers' | 'staticComponents' | 'staticInvokables'>;

export function optionsWithDefaults(options?: Options): CoreOptionsType {
if ((options as any)?.skipBabel) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just theoretically possible someone make skipBabel: false and this won’t detect the case so maybe could be

Suggested change
if ((options as any)?.skipBabel) {
if (‘skipBabel’ in (options as any) || {}) {

Copy link
Member Author

Choose a reason for hiding this comment

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

oh that's nice thanks! Although this PR isn't ready because I was expecting CI to error because we have some places where this is being set 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants