-
Notifications
You must be signed in to change notification settings - Fork 562
export mts #26172
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
base: main
Are you sure you want to change the base?
export mts #26172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables external packages to import the ESLint flat configuration from @fluidframework/eslint-config-fluid using the .mts file extension. It adds package exports mapping, moves the jiti dependency to production dependencies (as it's needed at runtime), and creates an ESM wrapper (flat.mjs) that uses jiti to load the TypeScript flat.mts file.
Key changes:
- Adds package.json exports to map
./flat.mtsimport to./flat.mjs - Moves
jitifrom devDependencies to dependencies for runtime TypeScript loading - Creates
flat.mjsas an ESM wrapper that loadsflat.mtsusing jiti
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
common/build/eslint-config-fluid/package.json |
Adds exports configuration to enable .mts import path and moves jiti to dependencies |
common/build/eslint-config-fluid/flat.mjs |
New ESM loader wrapper that uses jiti to load the TypeScript flat.mts file |
pnpm-lock.yaml |
Updates lock file to reflect jiti dependency movement |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
@zhangxin511 can you clarify how you expect to consume this in the server workspace? The package is private right now so no changes have been published since 8.1.0 (see the changelog). The plan is to publish again once we have completed the Eslint 9 migration in client, but until then the changes won't be available in a published package. |
Hey @tylerbutler , the server already referernced on this package, as We are facing some build error for server build, that is server build reference on eslint 8, and also reference on some common util packages in client/shared, and these dependencies reference on eslint 9. So at build time time, if you check server build error stack, you will find the version mismatch from using 8 to the non backward compatible 9 and cause build error: So for server, I unifed the eslint to 9 as well by doing: https://github.com/microsoft/FluidFramework/pull/26169/files, where referenced the |

How contribute to this repo.
Guidelines for Pull Requests.
The sections included below are suggestions for what you may want to include.
Feel free to remove or alter parts of this template that do not offer value for your specific change.
Description
export the mts defined in eslint config so server package can use it.