Skip to content

Commit

Permalink
Merge pull request #207 from tursodatabase/add-prettier
Browse files Browse the repository at this point in the history
Integrate prettier with pre-commit hooks
  • Loading branch information
penberg authored May 17, 2024
2 parents b58d509 + f412b50 commit 84a483e
Show file tree
Hide file tree
Showing 8 changed files with 640 additions and 21 deletions.
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky())
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint-staged
1 change: 1 addition & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "*.{js,ts}": "prettier --write" }
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib-cjs
lib-esm
Loading

0 comments on commit 84a483e

Please sign in to comment.