Skip to content

Commit 055afbb

Browse files
Merge pull request #26 from CodeCafeCommunity/enhancement/husky-for-auto-lint-on-commit
Enhancement/husky for auto lint on commit
2 parents b32330c + bcd7f71 commit 055afbb

File tree

5 files changed

+643
-34
lines changed

5 files changed

+643
-34
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Code Checks Before Committing
2+
3+
We use Husky and lint-staged to check your staged files.
4+
5+
When you commit, Husky triggers lint-staged, which runs tools like ESLint and Prettier on changed files.
6+
7+
If any issues are found, the commit is blocked until they’re fixed. Check your terminal output for linting or formatting errors.
8+
9+
Once everything passes, you can commit successfully!

0 commit comments

Comments
 (0)