Skip to content

Commit 29d9bda

Browse files
Palidt3chguy
andauthored
feat: Add autoformat and lint for ts/tsx files (#3835)
* feat: Add autoformat and lint for ts/tsx files * Update .lintstagedrc Co-authored-by: Michael Telatynski <[email protected]> --------- Co-authored-by: Michael Telatynski <[email protected]>
1 parent 88d066a commit 29d9bda

File tree

4 files changed

+214
-8
lines changed

4 files changed

+214
-8
lines changed

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.(ts|tsx)": ["eslint --fix", "prettier --write"],
3+
"*.(py|md|yaml)": ["prettier --write"]
4+
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,12 @@
108108
"exorcist": "^2.0.0",
109109
"fake-indexeddb": "^5.0.0",
110110
"fetch-mock-jest": "^1.5.1",
111+
"husky": "^8.0.3",
111112
"jest": "^29.0.0",
112113
"jest-environment-jsdom": "^29.0.0",
113114
"jest-localstorage-mock": "^2.4.6",
114115
"jest-mock": "^29.0.0",
116+
"lint-staged": "^15.0.2",
115117
"matrix-mock-request": "^2.5.0",
116118
"prettier": "2.8.8",
117119
"rimraf": "^5.0.0",

0 commit comments

Comments
 (0)