Skip to content

Add linguist support for KDL and jsonc files - #2350

Merged
Jake Bailey (jakebailey) merged 6 commits into
microsoft:mainfrom
Bashamega:main
Jan 7, 2026
Merged

Add linguist support for KDL and jsonc files#2350
Jake Bailey (jakebailey) merged 6 commits into
microsoft:mainfrom
Bashamega:main

Conversation

@Bashamega

Copy link
Copy Markdown
Contributor

This adds KDL to the list of languages. Check https://github.com/bashamega/TypeScript-DOM-lib-generator

Got this idea from mdn/content#14123

@saschanaz

Copy link
Copy Markdown
Contributor

Not sure we want to do that. mdn/content is almost 100% about markdown but this repo is about generating types and that's very typescript. We use KDL, sure, but to augment.

@HolgerJeromin

Copy link
Copy Markdown
Contributor

We use KDL, sure, but to augment.

The KDL files are no generated part, but written by hand. So IMO it would be nice to have that detected.
This change does only put the repo from

TypeScript 86.4%, JavaScript 13.6%

to the far more correct

TypeScript 71.0%, KDL 17.9%, JavaScript 11.1%

@Bashamega

Copy link
Copy Markdown
Contributor Author

I agree with Holger Jeromin (@HolgerJeromin)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should include .jsonc too then. But doing so would make it like 90% jsonc/kdl. Do we want that? I don't know...

Comment thread .gitattributes Outdated
###############################################################################
# linguist support for kdl
###############################################################################
*.kdl linguist-detectable=true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread .gitattributes Outdated
# linguist support for kdl
###############################################################################
*.kdl linguist-detectable=true
*.kdl linguist-language=KDL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to manually give language at all? This exists to reclassify the language, but the default classification should just work.

@HolgerJeromin

Copy link
Copy Markdown
Contributor

This should include .jsonc too then. But doing so would make it like 90% jsonc/kdl.

Which would be the truth.

Do we want that? I don't know...

Why not?

@Bashamega

Copy link
Copy Markdown
Contributor Author

I have updated it.

This should include .jsonc too then. But doing so would make it like 90% jsonc/kdl. Do we want that? I don't know...

Maybe not since we are currently in the progress of removing them

@saschanaz

Kagami Sascha Rosylight (saschanaz) commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

Why not?

Because it's not code but augmentations? (I mean, data instead of code)

Maybe not since we are currently in the progress of removing them

Which still has far way to go, and those are also handwritten so IMO either include both or neither

@Bashamega Adam Naji (Bashamega) changed the title Add linguist support for KDL files Add linguist support for KDL and jsonc files Jan 3, 2026
@Bashamega

Copy link
Copy Markdown
Contributor Author

JSONC and Typescript are competing LOL

JSON 42.1%
TypeScript 41.1%

@Bashamega

Copy link
Copy Markdown
Contributor Author

Good change

@saschanaz

Copy link
Copy Markdown
Contributor

(This needs maintainer permission to merge)

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's weird that GitHub needs this hint but, alrighty

@jakebailey
Jake Bailey (jakebailey) merged commit efda790 into microsoft:main Jan 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants