Skip to content

Commit 54c1e9e

Browse files
feat: add lint-staged (#5454)
1 parent 5a6e476 commit 54c1e9e

4 files changed

Lines changed: 409 additions & 0 deletions

File tree

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ echo "{\"pagination\": [],\"categories\": [],\"posts\": []}" > $DIR/../public/bl
1212
# adds these changes to be part of the current commit
1313
git add --sparse $DIR/../public/node-releases-data.json
1414
git add --sparse $DIR/../public/blog-posts-data.json
15+
16+
# lint and format staged files
17+
npx lint-staged

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"**/*": "npm run format"
3+
}

0 commit comments

Comments
 (0)