-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Support MTS TypeScript files #5696
Comments
Fixes: github-linguist#5696 Linguist should support the new extensions added in TypeScript 4.5 `.mts` (for es modules) and `.cts` (for commonjs). Linguist already supports `.mjs` files, the JavaScript equivalent.
I suspect you didn't plan on closing this so I'm reopening. I also think you mean Please note, support won't be added, ie any PR adding support won't be merged, until there is widespread use of the extensions (see CONTRIBUTING.md). |
Hi, I did mean to close, although it's in wide use on GitHub (mostly within node_modules folders), official support has been delayed and therefore I didn't want to commit to it. |
Added: * Config, Python: `.flake8` (github-linguist/linguist#5669) * C++: `.ixx` (github-linguist/linguist#5680) * Database: `MANIFEST.MF` (github-linguist/linguist#5505) * Docker: `Containerfile` (github-linguist/linguist#5588) * GLSL: `.r{chit,miss}` (github-linguist/linguist#5566) * HTML: `.hta` (github-linguist/linguist#5533) * Makefile: `.makefile` (github-linguist/linguist#5526) * Readme: `CITATION.cff` (github-linguist/linguist#5577) * Shell: `.kshrc` (github-linguist/linguist#5685) * TypeScript: `.cts`, `.mts` (github-linguist/linguist#5696) * XML: `.hzp` (github-linguist/linguist#5626)
MTS is used in 2K+ repos even when I restrict search to just node_modules/*/index.d.mts, so that should be alright at least. (link) |
Yeah althought it has widespread usage and semi support it's still the case that its not official yet, was meant to be in TS 4.6 but has since potentially slipped, see: microsoft/TypeScript#46452 for further info |
@rorymalcolm Not sure if it really slipped, the issue you are referencing states that this is the standard that they are aiming to establish, no? Also the https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#new-file-extensions |
Hadn't seen their inclusion 4.7's beta, probably fine, I just was aware there was some debate over it in the community when I wrote that comment months ago! |
Describe the enhancement
As of TypeScript 4.5, TypeScript supports
.mts
and.cts
files as possible extensions. Linguist should recognise these files as TypeScript files and highlight / index them accordingly.The text was updated successfully, but these errors were encountered: