Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint pre-commit hook using husky & lint-staged #1973

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Oct 31, 2024

@t3chguy t3chguy added the T-Task Tasks for the team like planning label Oct 31, 2024
@t3chguy t3chguy self-assigned this Oct 31, 2024
Signed-off-by: Michael Telatynski <[email protected]>
@t3chguy t3chguy marked this pull request as ready for review October 31, 2024 13:00
@t3chguy t3chguy requested review from a team as code owners October 31, 2024 13:00
Comment on lines +2 to +3
"*": "prettier --write",
"*.(ts|tsx)": ["eslint --fix"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I wonder if we want the hook to change the file. I'm expecting the hook to raise an error if there is a linting error, not to try to fix it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is consistent with the hooks in element-web & matrix-js-sdk

@t3chguy t3chguy merged commit e268e1a into develop Nov 5, 2024
40 checks passed
@t3chguy t3chguy deleted the t3chguy/fix/18230 branch November 5, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add git pre-commit hook to lint and test staged files
2 participants