Skip to content

Commit

Permalink
Add typechecking with lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerMatteo committed Sep 14, 2023
1 parent 3377962 commit ab1f7ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "npx eslint . --ext ts,tsx,js,jsx",
"lint": "eslint . --ext ts,tsx,js,jsx",
"typecheck": "tsc",
"preview": "vite preview",
"prepare": "husky install"
},
Expand All @@ -32,6 +33,6 @@
"vite": "^4.4.5"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": "npm run lint -- --fix"
"*.{ts,tsx}": ["bash -c 'npm run typecheck'", "npm run lint -- --fix"]
}
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"exclude": ["node_modules"],
"references": [{ "path": "./tsconfig.node.json" }]
}

0 comments on commit ab1f7ff

Please sign in to comment.