Skip to content

Commit 0ce8cc8

Browse files
authored
chore(workspace): lint and format on commit (graphql#4217)
Personally have been really annoyed with the lack of pre-commit in this repository, I have to commit twice every time as I'm not used to manually calling `npm run lint && npm run format`
1 parent c075a89 commit 0ce8cc8

File tree

4 files changed

+583
-5
lines changed

4 files changed

+583
-5
lines changed

.husky/pre-commit

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

.lintstagedrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"*.{js,ts}": [
3+
"eslint --max-warnings 0 --rulesdir resources/eslint-internal-rules/ --fix",
4+
"prettier --write"
5+
],
6+
"*.json": "prettier --write",
7+
"*.md": "prettier --write"
8+
}

0 commit comments

Comments
 (0)