If you host your Luanti games on Codeberg, GitHub or any Forgejo-powered website, you might have noticed an annoying oddity on your repo page: A weirdly large percentage of the programming language stats on the Codeberg or GitHub website is oddly marked as "TypeScript", although you didn't use TypeScript code anywhere. For example, the website might claim your repos is 80% Lua, 20% TypeScript.
I recently figured out why. Apparently these sites detect *.mts files as TypeScript. In Luanti, these are of course the Minetest Schematic files, not TypeScript.
Solution
If TypeScript shows up in your language stats, add the file .gitattributes to your repository (if it does not exist already) and write this line:
Code: Select all
*.mts linguist-detectable=false(See the Forgejo documentation (for Codeberg) or GitHub Linguist documentation (for GitHub) for an explanation on why this works.)
Example
Check out the Lazarr! repo in your browser: https://codeberg.org/Wuzzy/Lazarr
The language stats (the colored bar) should not mention TypeScript.