Skip to content

Commit

Permalink
feat: Add autoformat and lint for ts/tsx files
Browse files Browse the repository at this point in the history
  • Loading branch information
Palid committed Nov 22, 2023
1 parent 087be3e commit 6cd6d42
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"src/**/*.(ts|tsx)": ["eslint --fix"],
"module_system/**/*.(ts|tsx)": ["eslint --fix --config .eslintrc-module_system.js module_system"],
"**/*.(ts|tsx)": ["prettier --write"],
"res/css/**/*.pcss": ["stylelint --fix"]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@
"fetch-mock-jest": "^1.5.1",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^5.5.3",
"husky": "^8.0.3",
"jest": "^29.0.0",
"jest-canvas-mock": "2.5.2",
"jest-environment-jsdom": "^29.0.0",
"jest-mock": "^29.0.0",
"jest-raw-loader": "^1.0.1",
"lint-staged": "^15.1.0",
"matrix-mock-request": "^2.5.0",
"matrix-web-i18n": "^3.1.3",
"mini-css-extract-plugin": "^2.7.6",
Expand Down
Loading

0 comments on commit 6cd6d42

Please sign in to comment.