Skip to content

Commit

Permalink
Remove pretty-quick and add lint-staged (w3f#5135)
Browse files Browse the repository at this point in the history
* added lint staged

* added lint staged
  • Loading branch information
CrackTheCode016 authored Aug 28, 2023
1 parent aabc965 commit 54c8f66
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 75 deletions.
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
npx pretty-quick --staged
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*": "prettier --write"
}
2 changes: 1 addition & 1 deletion docs/general/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ There are a few basic ground-rules for contributors:
8. Care should be taken to remain as objective and informative as possible. There should be no
editorializing, and external bias should not be present.
9. We use a plugin called Prettier to standardize the style across documents. You can run this on
your local copy with `npx pretty-quick --staged`, but for simplicity we also have a bot which
your local copy with `npx lint-staged`, but for simplicity we also have a bot which
runs this for us in your PRs.

## Heritage
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"husky": "^8.0.3",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"lint-staged": "^14.0.1",
"loud-rejection": "^2.2.0",
"mr-pdf": "^1.1.0",
"prettier": "^3.0.2",
"pretty-quick": "^3.1.3",
"react": "^17.0.2",
"react-bootstrap": "^2.8.0",
"react-dom": "^17.0.2",
Expand All @@ -79,7 +79,7 @@
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
"pre-commit": "lint-staged"
}
}
}
Loading

0 comments on commit 54c8f66

Please sign in to comment.