Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
- uses: ./.github/actions/setup-go

- run: npm ci

- run: go -C ./_tools run ./cmd/checkmodpaths $PWD

- run: npx hereby check:scripts

required:
runs-on: ubuntu-latest
if: ${{ always() }}
Expand Down
17 changes: 17 additions & 0 deletions Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,23 @@ export const checkFormat = task({
},
});

const scriptTsconfigs = [
"./_scripts/tsconfig.json",
"./internal/fourslash/_scripts/tsconfig.json",
"./internal/lsp/lsproto/_generate/tsconfig.json",
];

export const checkScripts = task({
name: "check:scripts",
description: "Type-checks TypeScript scripts.",
run: async () => {
for (const tsconfig of scriptTsconfigs) {
console.log(`Type-checking ${tsconfig}`);
await $`tsc -p ${tsconfig}`;
}
},
});

/**
* @param {string} localBaseline Path to the local copy of the baselines
* @param {string} refBaseline Path to the reference copy of the baselines
Expand Down
4 changes: 2 additions & 2 deletions internal/fourslash/_scripts/convertFourslash.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string {
break;
case "organizeImportsTypeOrder":
if (!ts.isStringLiteralLike(prop.initializer)) {
return undefined;
throw new Error(`Expected string literal for organizeImportsTypeOrder, got ${prop.initializer.getText()}`);
}
switch (prop.initializer.text) {
case "last":
Expand All @@ -1870,7 +1870,7 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string {
preferences.push(`OrganizeImportsTypeOrder: lsutil.OrganizeImportsTypeOrderFirst`);
break;
default:
return undefined;
throw new Error(`Unsupported organizeImportsTypeOrder value: ${prop.initializer.text}`);
}
break;
case "autoImportFileExcludePatterns":
Expand Down
Loading