Conversation
🦋 Changeset detectedLatest commit: 785dd34 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
2f68f10 to
c818e96
Compare
|
@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? |
|
Great job, and I've reopened #1036 |
c818e96 to
aa02ef9
Compare
package.json
Outdated
| @@ -52,20 +54,29 @@ | |||
| "@babel/preset-env": "^7.22.9", | |||
There was a problem hiding this comment.
These dependencies can be dropped.
There was a problem hiding this comment.
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
aa02ef9 to
e3f4501
Compare
|
@duncanbeevers do not merge this PR, have ported to #1036 |
|
Stale pull request |
| return await import(modulePath).then( | ||
| ({ default: defaultExport }) => defaultExport, | ||
| ); |
There was a problem hiding this comment.
This function should not intercept the default export by default.
eslint/prettier both support named exports.
rollup.config.mjs
Outdated
| nodeResolve({ preferBuiltins: true }), | ||
| json(), | ||
| ], | ||
| }; |
There was a problem hiding this comment.
Personally, I prefer to use esbuild.
| logger.trace(`requiring "${name}" module at "${modulePath}"`); | ||
| return require(modulePath); | ||
| logger.trace(`importing "${name}" module at "${modulePath}"`); | ||
| return await import(modulePath).then( |
There was a problem hiding this comment.
This import() will fail on Windows, since it doesn't take Windows path.
🗣️ Discussion
This PR is intended to get
prettier-eslintrunning 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