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

Handle TypeScript 4.5 new file extensions .mts and .cts #11721

Merged
merged 3 commits into from
Oct 30, 2021

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Oct 29, 2021

Description

Partial of #11600

See https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#new-file-extensions for details.

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • I’ve read the contributing guidelines.

Try the playground for this PR

since: "1.4.0",
parsers: ["typescript", "babel-ts"],
vscodeLanguageIds: ["typescript"],
extensions: [...data.extensions, ".mts", ".cts"],
Copy link
Member Author

Choose a reason for hiding this comment

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

We can remove this if .mts and .cts are added to linguist-language

Copy link
Member

Choose a reason for hiding this comment

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

Do you think code blocks in markdown with language mts should use ts parser too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. But honestly, I don't care either way...

Copy link
Member Author

Choose a reason for hiding this comment

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

@fisker Do you have any concern for current implementation?

@sosukesuzuki sosukesuzuki added this to the 2.5 milestone Oct 29, 2021
@sosukesuzuki
Copy link
Member Author

This is a feature for next minor version, but we probably never release patch release 2.4.x so I'll merge this.

@sosukesuzuki sosukesuzuki merged commit fb7080f into prettier:main Oct 30, 2021
@sosukesuzuki sosukesuzuki deleted the handle-mts-cts branch October 30, 2021 11:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants