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
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint, Format and Type check workflow

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
linting_and_type-checking:
name: Linting, Formatting and Type checking
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Linting and Formatting checks
run: yarn run lint

- name: Type checking
run: yarn run typecheck
Empty file added .husky/_/husky.sh
Empty file.
6 changes: 6 additions & 0 deletions .husky/_/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/husky.sh"

echo 'Performing code styling, testing, and building processes before committing'

yarn run lint && yarn run typecheck
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"devDependencies": {
"@repo/eslint-config": "*",
"@repo/typescript-config": "*",
"prettier": "^3.2.5",
"turbo": "latest"
},
"engines": {
"node": ">=18"
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"typecheck": "tsc --pretty --noEmit",
"prepare": "husky"
},
"devDependencies": {
"@repo/eslint-config": "*",
"@repo/typescript-config": "*",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"turbo": "latest"
},
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
Expand Down