Skip to content

Commit 388e123

Browse files
authored
Merge pull request #893 from JounQin/fix/ts_extensions
2 parents 874b8c6 + 3847f17 commit 388e123

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@master
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 18.x
17+
node-version: 20.x
1818
cache: yarn
1919
- name: Lint and test
2020
run: |

bin/languages.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
import { writeFileSync } from "node:fs";
4-
import linguistLanguages from "linguist-languages";
4+
import * as linguistLanguages from "linguist-languages";
55
import { format } from "prettier";
66
import packageJSON from "../package.json" with { type: "json" };
77

@@ -16,8 +16,14 @@ function getSupportLanguages() {
1616
// manually-maintained list. These two had been added manually. So in the
1717
// interest of not breaking anything, we'll add them back in here.
1818
if (language.name === "XML") {
19-
language.extensions?.push(".inx", ".runsettings");
20-
language.extensions?.sort();
19+
let extensions = language.extensions;
20+
if (extensions) {
21+
extensions.push(".inx", ".runsettings");
22+
config.extensions = extensions
23+
// https://github.com/github-linguist/linguist/pull/1842
24+
.filter((e) => ![".ts", ".tsx"].includes(e))
25+
.sort();
26+
}
2127
}
2228

2329
supportLanguages.push({

0 commit comments

Comments
 (0)