Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added typechecking for all ts files #6466

Merged
merged 13 commits into from
Aug 20, 2024
5 changes: 4 additions & 1 deletion .github/workflows/ci-front.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,7 @@ jobs:
uses: ./.github/workflows/actions/nx-affected
with:
tag: scope:frontend
tasks: ${{ matrix.task }}
tasks: ${{ matrix.task }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not necessary we already have a CI task for that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

- name: TypeScript Type Check
if: matrix.task == 'typecheck'
run: npx tsc --noEmit -p packages/twenty-front/tsconfig.json
9 changes: 8 additions & 1 deletion packages/twenty-front/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
}
},
"files": [],
"include": [],
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.stories.ts",
"src/**/*.stories.tsx",
"src/**/*.test.ts",
"src/**/*.test.tsx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Including all test and story files in type-checking might increase the CI build time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the solution would involve tsconfig.app.json, maybe we should just remove the excluded array ?

Please test by modifying a TS type that is both present in a .tsx file and a story file, you dev env in VS Code should return an error for the story, while it is not doing it right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will try that

],
"references": [
{
"path": "./tsconfig.app.json"
Expand Down
Loading