Skip to content
This repository was archived by the owner on Dec 7, 2024. It is now read-only.

Commit dd20741

Browse files
Palidt3chguy
andauthored
feat: Add autoformat and lint for ts/tsx files (matrix-org#11806)
* feat: Add autoformat and lint for ts/tsx files * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]> Co-authored-by: Michael Telatynski <[email protected]>
1 parent 272a66b commit dd20741

File tree

4 files changed

+273
-4
lines changed

4 files changed

+273
-4
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 --concurrent false

.lintstagedrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"*": "prettier --write",
3+
"*.(ts|tsx|js|jsx)": ["eslint --fix"],
4+
"*.pcss": ["stylelint"]
5+
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,14 @@
218218
"fetch-mock-jest": "^1.5.1",
219219
"fs-extra": "^11.0.0",
220220
"glob": "^11.0.0",
221+
"husky": "^8.0.3",
221222
"jest": "^29.6.2",
222223
"jest-canvas-mock": "^2.5.2",
223224
"jest-environment-jsdom": "^29.6.2",
224225
"jest-mock": "^29.6.2",
225226
"jest-raw-loader": "^1.0.1",
226227
"jsqr": "^1.4.0",
228+
"lint-staged": "^15.0.2",
227229
"mailhog": "^4.16.0",
228230
"matrix-web-i18n": "^3.2.1",
229231
"mocha-junit-reporter": "^2.2.0",

0 commit comments

Comments
 (0)