Skip to content

Commit

Permalink
Tim/enforce prettier and eslint on precommit (#32)
Browse files Browse the repository at this point in the history
* chore: enforce husky precommit hooks for eslint and prettier

* chore: run prettier --write .

* chore: update release workflow to tag prerelease versions with latest git tag
  • Loading branch information
teebszet authored Oct 6, 2023
1 parent 1419b58 commit 8869714
Show file tree
Hide file tree
Showing 4 changed files with 1,022 additions and 41 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ jobs:
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run build
- run: npm publish --tag prerelease
- id: use-tag-version
if: github.event.release.prerelease
run: npm version --no-git-tag-version $(git describe --tags --abbrev=0 | sed 's/^v//')
- id: publish-prerelease
if: github.event.release.prerelease
run: npm publish --tag prerelease
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish
if: "!github.event.release.prerelease"
if: '!github.event.release.prerelease'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
Loading

0 comments on commit 8869714

Please sign in to comment.