Skip to content

Commit

Permalink
Run TypeScript in pre-commit hook
Browse files Browse the repository at this point in the history
This should help catch issues like
#43 (comment).
  • Loading branch information
lpsinger committed Jun 25, 2024
1 parent eb4de76 commit e4267b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
*.js
*.tgz
*.tsbuildinfo
4 changes: 4 additions & 0 deletions lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
'*.(json|md|ts)': 'prettier --write',
'*.ts': ['eslint', () => 'tsc'],
}
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,5 @@
"parserOptions": {
"sourceType": "module"
}
},
"lint-staged": {
"*.(json|md|ts)": "prettier --write",
"*.ts": "eslint"
}
}
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "@tsconfig/node14/tsconfig.json",
"compilerOptions": {
"incremental": true,
"noEmit": true,
"resolveJsonModule": true,
"module": "esnext",
"target": "es2022"
Expand Down

0 comments on commit e4267b8

Please sign in to comment.