Skip to content

Commit

Permalink
feat: adds typecheck scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Dec 24, 2022
1 parent 72a31fb commit e079da5
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
cache: 'pnpm'
- run: pnpm install --prefer-offline --frozen-lockfile
- run: pnpm nx-cloud start-ci-run
- run: pnpm nx affected --target=typecheck --parallel --max-parallel=3
- run: pnpm nx affected --target=build --parallel --max-parallel=3
- run: pnpm nx affected --target=test --parallel --max-parallel=2
- run: pnpm nx-cloud stop-all-agents
Expand All @@ -50,6 +51,7 @@ jobs:
cache: 'pnpm'
- run: pnpm install
- run: pnpm nx-cloud start-ci-run
- run: pnpm nx affected --target=typecheck --parallel --max-parallel=3
- run: pnpm nx affected --target=build --parallel --max-parallel=3
- run: pnpm nx affected --target=test --parallel --max-parallel=2
- run: pnpm nx-cloud stop-all-agents
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ storybook-static
# Playwright
**/test-results
**/playwright-report
**/playwright/.cache
**/playwright/.cache

*.tsbuildinfo
9 changes: 5 additions & 4 deletions apps/client-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
}
}
},
"ts-check": {
"executor": "@nrwl/workspace:run-commands",
"typecheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "tsc --build --force --verbose apps/client-e2e/tsconfig.json"
"command": "pnpm tsc --project apps/client-e2e/tsconfig.e2e.json --noEmit"
}
]
],
"parallel": true
}
},
"lint": {
Expand Down
14 changes: 14 additions & 0 deletions apps/client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@
"options": {
"lintFilePatterns": ["apps/client/**/*.{ts,tsx,js,jsx}"]
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "pnpm tsc --project apps/client/tsconfig.json --noEmit"
},
{
"command": "pnpm tsc --project apps/client/tsconfig.spec.json --noEmit"
}
],
"parallel": true
}
}
},
"tags": []
Expand Down
17 changes: 17 additions & 0 deletions libs/editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@
"quiet": true
}
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "pnpm tsc --project libs/editor/tsconfig.lib.json --noEmit"
},
{
"command": "pnpm tsc --project libs/editor/tsconfig.spec.json --noEmit"
},
{
"command": "pnpm tsc --project libs/editor/.storybook/tsconfig.json --noEmit"
}
],
"parallel": true
}
}
}
}
14 changes: 14 additions & 0 deletions libs/server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
"jestConfig": "libs/server/jest.config.ts",
"passWithNoTests": true
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "pnpm tsc --project libs/server/tsconfig.lib.json --noEmit"
},
{
"command": "pnpm tsc --project libs/server/tsconfig.spec.json --noEmit"
}
],
"parallel": true
}
}
}
}
17 changes: 17 additions & 0 deletions libs/ui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,23 @@
"quiet": true
}
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "pnpm tsc --project libs/ui/tsconfig.lib.json --noEmit"
},
{
"command": "pnpm tsc --project libs/ui/tsconfig.spec.json --noEmit"
},
{
"command": "pnpm tsc --project libs/ui/.storybook/tsconfig.json --noEmit"
}
],
"parallel": true
}
}
}
}
1 change: 0 additions & 1 deletion libs/ui/src/organisms/Sidebar/Sidebar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Sidebar } from './Sidebar';
const args: ComponentProps<typeof Sidebar> = {
user: {
name: 'Ahmed Elsakaan',
course: 'Computer Science',
avatar: 'https://avatars.githubusercontent.com/u/20271968?v=4',
},
links: [
Expand Down
3 changes: 2 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint",
"test",
"e2e",
"build-storybook"
"build-storybook",
"typecheck"
],
"accessToken": "NDNkZmU5MzctMGIzNC00MTRjLWIyODUtYTE1NTRkYzE2ZDIwfHJlYWQtd3JpdGU="
}
Expand Down

0 comments on commit e079da5

Please sign in to comment.