Skip to content

Commit 891ce74

Browse files
authored
Merge pull request #1847 from github/koesie10/typecheck-everything
Run type checking on all directories in CI
2 parents 7dedfca + e2e4879 commit 891ce74

35 files changed

+62
-66
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ jobs:
9090
npm ci
9191
shell: bash
9292

93+
- name: Check types
94+
working-directory: extensions/ql-vscode
95+
run: |
96+
npm run check-types
97+
9398
- name: Lint
9499
working-directory: extensions/ql-vscode
95100
run: |
Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
3+
"extends": "../tsconfig.json",
34
"compilerOptions": {
4-
"declaration": true,
5-
"strict": true,
6-
"module": "commonjs",
7-
"target": "es2021",
8-
"lib": ["ES2021"],
9-
"moduleResolution": "node",
10-
"sourceMap": true,
11-
"rootDir": ".",
12-
"strictNullChecks": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"preserveWatchOutput": true,
15-
"newLine": "lf",
16-
"noImplicitReturns": true,
17-
"experimentalDecorators": true,
18-
"noUnusedLocals": true,
19-
"noUnusedParameters": true,
20-
"esModuleInterop": true
5+
"rootDir": "."
216
},
227
"include": ["*.ts"]
238
}

extensions/ql-vscode/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,7 @@
12991299
"storybook": "start-storybook -p 6006",
13001300
"build-storybook": "build-storybook",
13011301
"lint:scenarios": "ts-node scripts/lint-scenarios.ts",
1302+
"check-types": "find . -type f -name \"tsconfig.json\" -not -path \"./node_modules/*\" | sed -r 's|/[^/]+$||' | sort | uniq | xargs -I {} sh -c \"echo Checking types in {} && cd {} && npx tsc --noEmit\"",
13021303
"postinstall": "patch-package"
13031304
},
13041305
"dependencies": {
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
module.exports = {
22
env: {
3-
browser: true
3+
browser: true,
44
},
5-
plugins: [
6-
"github",
7-
],
5+
plugins: ["github"],
86
extends: [
97
"plugin:github/react",
108
"plugin:github/recommended",
@@ -16,12 +14,13 @@ module.exports = {
1614
rules: {
1715
"filenames/match-regex": "off",
1816
"import/named": "off",
17+
"import/no-namespace": "off",
1918
"import/no-unresolved": "off",
2019
"no-unused-vars": "off",
2120
},
2221
settings: {
2322
react: {
24-
version: 'detect'
25-
}
26-
}
27-
}
23+
version: "detect",
24+
},
25+
},
26+
};

extensions/ql-vscode/src/stories/common/Alert.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import * as React from "react";
22

33
import { ComponentStory, ComponentMeta } from "@storybook/react";
44
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react";

extensions/ql-vscode/src/stories/common/CodePaths.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import * as React from "react";
22

33
import { ComponentStory, ComponentMeta } from "@storybook/react";
44
import { ThemeProvider } from "@primer/react";

extensions/ql-vscode/src/stories/common/FileCodeSnippet.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import * as React from "react";
22

33
import { ComponentStory, ComponentMeta } from "@storybook/react";
44

extensions/ql-vscode/src/stories/common/LastUpdated.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import * as React from "react";
22

33
import { ComponentStory, ComponentMeta } from "@storybook/react";
44

extensions/ql-vscode/src/stories/common/StarCount.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import * as React from "react";
22

33
import { ComponentStory, ComponentMeta } from "@storybook/react";
44

extensions/ql-vscode/src/stories/common/icon/Codicon.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React from "react";
1+
import * as React from "react";
22

33
import { ComponentStory, ComponentMeta } from "@storybook/react";
44

55
import { CodePaths, Codicon as CodiconComponent } from "../../../view/common";
66

77
// To regenerate the icons, use the following command from the `extensions/ql-vscode` directory:
88
// jq -R '[inputs | [splits(", *")] as $row | $row[0]]' < node_modules/@vscode/codicons/dist/codicon.csv > src/stories/common/icon/vscode-icons.json
9-
import icons from "./vscode-icons.json";
9+
import * as icons from "./vscode-icons.json";
1010

1111
export default {
1212
title: "Icon/Codicon",

0 commit comments

Comments
 (0)