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

chore: Rollup & Vitest #1083

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

duncanbeevers
Copy link

🗣️ Discussion

This PR is intended to get prettier-eslint running on a little more modern testing infrastructure, and to emit CJS and ESM bundles.
Specifically, I'd like to add support for handling newer TypeScript versions and flat configs (re; #947, #1015, #1036,)

🔧 Changes

  • Use Rollup instead of Babel to generate CJS and ESM bundles
  • Convert implementation to ESM
  • Use Vitest instead of Jest for tests
  • Use memfs instead of mocking specific node:fs functions
  • Update nps calls to use CJS config

Copy link

changeset-bot bot commented Dec 7, 2024

🦋 Changeset detected

Latest commit: e3f4501

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
prettier-eslint Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@phun-ky
Copy link

phun-ky commented Jan 29, 2025

@duncanbeevers can we join forces on this #1036, so we can support eslint@9? and @JounQin , could you reopen the PR or will it do it automagically when we push new changes?

@duncanbeevers
Copy link
Author

@phun-ky Feel free to port any / all of this over to your PR. I used #1036 as a launching-point for this work, so hopefully it shouldn't be too difficult to reconcile the two.

I'm happy close this PR, or to leave it open until the other PR is resuscitated. Let me know how I can help!

@JounQin
Copy link
Member

JounQin commented Jan 30, 2025

Great job, and I've reopened #1036

package.json Outdated
@@ -52,20 +54,29 @@
"@babel/preset-env": "^7.22.9",
Copy link
Member

Choose a reason for hiding this comment

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

These dependencies can be dropped.

Copy link
Author

Choose a reason for hiding this comment

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

Are you certain? The options we pass to prettier include { parser: 'babel' }.
If prettier ships with its own babel parser stuff I guess that's fine.

I pushed the PR with the babel dependencies removed, and the tests are passing, so hopefully everything is peachy.

* Use Rollup instead of Babel to generate CJS and ESM bundles
* Convert implementation to ESM
* Use Vitest instead of Jest for tests
* Use memfs instead of mocking specific node:fs functions
* Update nps calls to use CJS config
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