Run type checking on all directories in CI
This commit adds a new step to the CI workflow that runs type checking on all directories containing `tsconfig.json` files, using `find` and `xargs`. Unfortunately, this does not work on Windows, so on Windows it's not possible to run all of these type checks locally.
This commit is contained in:
Родитель
572ba290b4
Коммит
2e7557ba09
|
@ -90,6 +90,11 @@ jobs:
|
|||
npm ci
|
||||
shell: bash
|
||||
|
||||
- name: Check types
|
||||
working-directory: extensions/ql-vscode
|
||||
run: |
|
||||
npm run check-types
|
||||
|
||||
- name: Lint
|
||||
working-directory: extensions/ql-vscode
|
||||
run: |
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
"noImplicitReturns": true,
|
||||
"experimentalDecorators": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"esModuleInterop": true
|
||||
"noUnusedParameters": true
|
||||
},
|
||||
"include": ["*.ts"]
|
||||
}
|
||||
|
|
|
@ -1299,6 +1299,7 @@
|
|||
"storybook": "start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook",
|
||||
"lint:scenarios": "ts-node scripts/lint-scenarios.ts",
|
||||
"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\"",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
browser: true
|
||||
browser: true,
|
||||
},
|
||||
plugins: [
|
||||
"github",
|
||||
],
|
||||
plugins: ["github"],
|
||||
extends: [
|
||||
"plugin:github/react",
|
||||
"plugin:github/recommended",
|
||||
|
@ -16,12 +14,13 @@ module.exports = {
|
|||
rules: {
|
||||
"filenames/match-regex": "off",
|
||||
"import/named": "off",
|
||||
"import/no-namespace": "off",
|
||||
"import/no-unresolved": "off",
|
||||
"no-unused-vars": "off",
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect'
|
||||
}
|
||||
}
|
||||
}
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
import { ThemeProvider } from "@primer/react";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { CodePaths, Codicon as CodiconComponent } from "../../../view/common";
|
|||
|
||||
// To regenerate the icons, use the following command from the `extensions/ql-vscode` directory:
|
||||
// jq -R '[inputs | [splits(", *")] as $row | $row[0]]' < node_modules/@vscode/codicons/dist/codicon.csv > src/stories/common/icon/vscode-icons.json
|
||||
import icons from "./vscode-icons.json";
|
||||
import * as icons from "./vscode-icons.json";
|
||||
|
||||
export default {
|
||||
title: "Icon/Codicon",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React, { useEffect } from "react";
|
||||
import * as React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
import { RemoteQueries } from "../../view/remote-queries/RemoteQueries";
|
||||
|
||||
import remoteQueryResult from "./data/remoteQueryResultMessage.json";
|
||||
import analysesResults from "./data/analysesResultsMessage.json";
|
||||
import * as remoteQueryResult from "./data/remoteQueryResultMessage.json";
|
||||
import * as analysesResults from "./data/analysesResultsMessage.json";
|
||||
|
||||
export default {
|
||||
title: "MRVA/Remote Queries",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState } from "react";
|
||||
import * as React from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"noFallthroughCasesInSwitch": true,
|
||||
"experimentalDecorators": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
import { VariantAnalysisFailureReason } from "../../remote-queries/shared/variant-analysis";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
@ -13,8 +13,8 @@ import {
|
|||
} from "../../remote-queries/shared/analysis-result";
|
||||
import { createMockRepositoryWithMetadata } from "../../vscode-tests/factories/remote-queries/shared/repository";
|
||||
|
||||
import analysesResults from "../remote-queries/data/analysesResultsMessage.json";
|
||||
import rawResults from "../remote-queries/data/rawResults.json";
|
||||
import * as analysesResults from "../remote-queries/data/analysesResultsMessage.json";
|
||||
import * as rawResults from "../remote-queries/data/rawResults.json";
|
||||
import { RepoRow } from "../../view/variant-analysis/RepoRow";
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState } from "react";
|
||||
import * as React from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState } from "react";
|
||||
import * as React from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState } from "react";
|
||||
import * as React from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
@ -15,7 +15,7 @@ import { createMockVariantAnalysis } from "../../vscode-tests/factories/remote-q
|
|||
import { createMockRepositoryWithMetadata } from "../../vscode-tests/factories/remote-queries/shared/repository";
|
||||
import { createMockScannedRepo } from "../../vscode-tests/factories/remote-queries/shared/scanned-repositories";
|
||||
|
||||
import analysesResults from "../remote-queries/data/analysesResultsMessage.json";
|
||||
import * as analysesResults from "../remote-queries/data/analysesResultsMessage.json";
|
||||
|
||||
export default {
|
||||
title: "Variant Analysis/Analyzed Repos",
|
||||
|
@ -151,10 +151,10 @@ const manyScannedRepos = Array.from({ length: 1000 }, (_, i) => {
|
|||
export const PerformanceExample = Template.bind({});
|
||||
PerformanceExample.args = {
|
||||
variantAnalysis: {
|
||||
...createMockVariantAnalysis(
|
||||
VariantAnalysisStatus.Succeeded,
|
||||
manyScannedRepos,
|
||||
),
|
||||
...createMockVariantAnalysis({
|
||||
status: VariantAnalysisStatus.Succeeded,
|
||||
scannedRepos: manyScannedRepos,
|
||||
}),
|
||||
id: 1,
|
||||
},
|
||||
repositoryResults: manyScannedRepos.map((repoTask) => ({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState } from "react";
|
||||
import * as React from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче