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

Add Babel preset for React package #4653

Merged

Conversation

fdanielsen
Copy link
Contributor

@fdanielsen fdanielsen commented Sep 13, 2023

The React preset for Babel is useful for automatically adding Babel plugins to understand JSX syntax.

Proposed Changes

  1. Add Babel preset for React
  2. Update Babel ESLint parser to new package name

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

The React preset for Babel is useful for automatically adding Babel
plugins to understand JSX syntax.
@zkoppert
Copy link
Contributor

@fdanielsen Thanks for submitting a pull request!

I'm confused and need some help to determine what we are trying to accomplish here. This pull request currently adds a dependency but then I don't see any code that actually uses that dependency. Can you help me understand the goal of this pull request?

@fdanielsen
Copy link
Contributor Author

@fdanielsen Thanks for submitting a pull request!

I'm confused and need some help to determine what we are trying to accomplish here. This pull request currently adds a dependency but then I don't see any code that actually uses that dependency. Can you help me understand the goal of this pull request?

Sorry for the confusion. I don't think there is any direct code in super-linter to update. But our ESLint config, and I would think quite a few others', depend implicitly on this preset. We use the @babel/eslint-parser for ESLint, and the ESLint React plugin amongst others, and end up depending on this preset too. Since we can't install node modules ourselves I hoped this could be included in super-linter together with the other ESLint and Babel plugins/packages you include.

@zkoppert zkoppert self-assigned this Sep 15, 2023
@zkoppert zkoppert added the dependencies Pull requests that update a dependency file label Sep 15, 2023
@zkoppert
Copy link
Contributor

That makes more sense. Can you resolve the branch conflicts and we can get this one merged through?

@fdanielsen
Copy link
Contributor Author

Great, I've merged in latest from the main branch now and fixed conflicts.

Copy link
Contributor

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

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

🎉 Thanks for the contribution!!

@zkoppert zkoppert added this pull request to the merge queue Sep 19, 2023
Merged via the queue into super-linter:main with commit f803067 Sep 19, 2023
3 checks passed
@fdanielsen fdanielsen deleted the fdanielsen/add-babel-preset-react branch September 20, 2023 08:35
@fdanielsen
Copy link
Contributor Author

🎉 Thanks for the contribution!!

Thanks for the prompt review! Any idea when you'll make a new release so I can test this out in a GitHub action?

@zkoppert
Copy link
Contributor

I try to keep an every Friday release schedule but am also terrible at doing it consistently. So, i've just published a new release so you can give it a try anytime.

https://github.com/super-linter/super-linter/releases/tag/v5.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants