Linguist: Typescript repo beeing recognized as Javascript

Created on 10 Jul 2020  路  6Comments  路  Source: github/linguist

Problem Description

Could it be because of the .json files? Still, it should show 1% Typescript at least

URL of the affected repository:

https://github.com/rafmst/propor

Last modified on:

2019-07-10

Expected language:

Typescript

Detected language:

Javascript

Stale

All 6 comments

Could it be because of the .json files?

Nope. It's because of the shebang:

#!/usr/bin/env node

Linguist considers node as an interpreter for Javascript, not Typescript:

https://github.com/github/linguist/blob/775b07d40c04ef6e0051a541886a8f1e30a892f4/lib/linguist/languages.yml#L2564-L2569

For Typescript, you'd need to either use deno or ts-node:

https://github.com/github/linguist/blob/775b07d40c04ef6e0051a541886a8f1e30a892f4/lib/linguist/languages.yml#L5595-L5602

That explains it, I will try to fix it like you suggested. Thanks for the help, have a nice weekend 馃榿

@lildude I associated the node interpreter with TypeScript in #4261. When did we remove that?

When @Alhadis merged https://github.com/github/linguist/pull/4470 馃榿

The OP of the PR states:

UPDATE: This PR's been updated to remove node from TypeScript's interpreters list as well, following conversation between @pchaigno and @grant. Merging this PR will now also fix #4469.

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions.

This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sanchez3 picture Sanchez3  路  4Comments

arfon picture arfon  路  6Comments

FranklinYu picture FranklinYu  路  4Comments

oliviertassinari picture oliviertassinari  路  5Comments

pfitzseb picture pfitzseb  路  5Comments