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

build: add husky,support lint code when pre-commmit #178

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

alanhe421
Copy link
Contributor

@alanhe421 alanhe421 commented Mar 2, 2024

Ensure that the commit code automatically lint to avoid style issues.

@cpendery thanks.

},
"lint-staged": {
"{,src/**/}*.{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.

Can we re-use the npm run lint:fix command here to keep everything consistent between hooks & package.json commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes.

Because I was thinking of doing a git commit to perform a lint on the modified files, if you call our lint:fix it actually performs a lint on all the files. it depends on what you're used to, but if you want it to be that way, I'll change it again.

Copy link
Member

Choose a reason for hiding this comment

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

Let's just stick with this version so it's only running on staged files

@cpendery cpendery merged commit d2b1333 into microsoft:main Mar 5, 2024
3 checks passed
@alanhe421 alanhe421 deleted the feat/husky branch March 5, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants