Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Implement husky #160

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ permissions:
checks: write
pull-requests: write

env:
HUSKY: 0
CI: true

jobs:
build:
name: Build
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to release'
description: "Branch to release"
required: true
default: 'main'
default: "main"

env:
HUSKY: 0
CI: true
jobs:
release:
name: Release
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/secrets_scanner.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Leaked Secrets Scan
on: [pull_request]
env:
HUSKY: 0
CI: true
jobs:
TruffleHog:
runs-on: ubuntu-latest
Expand Down
74 changes: 68 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,71 @@
# Default
node_modules
# Logs

logs
*.log

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# Dependency directories

node_modules/
jspm_packages/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# npm and pnpm
__package_previews__
.store
itsacoyote marked this conversation as resolved.
Show resolved Hide resolved

privatePackages/store
pnpm-lock.yaml

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local
.env.*
!.env.example

# Finder (MacOS) folder config
.DS_Store

.history

# Build
bin
# bin build

# Workflow
junit.xml
bin
6 changes: 1 addition & 5 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
npm run commitlint
npx --no-install commitlint --edit "$1"
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())
5 changes: 2 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
npx --no -- lint-staged

4 changes: 4 additions & 0 deletions .lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"*.{js,ts,vue}":
- eslint --max-warnings=0
"*.ts":
- tsc-files --noEmit
Loading
Loading