Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / lefthook.yml |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | lefthook.yml |
| Original SHA-256 | 863a20c9ba6cd2ab1a1b1104b45019206ef76d52b98d80876870929e6fe97af3 |
| Git blob SHA | e7f00261089a83d7792175f63fd8dd0a48f4ecb0 |
| Reading-copy SHA-256 | 863a20c9ba6cd2ab1a1b1104b45019206ef76d52b98d80876870929e6fe97af3 |
Recovered source transcript
Download complete source text ↓106 lines · 3.0 KB
# Lefthook Configuration
# Using existing validation scripts
pre-commit:
parallel: true
commands:
# Code formatting and linting
check:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
stage_fixed: true
# Package.json sorting
sort-package-json:
glob: "**/{package.json}"
exclude: "node_modules/**"
run: pnpm dlx sort-package-json {staged_files}
stage_fixed: true
# MDX content validation
check-frontmatter:
glob: "packages/content/data/websites/*.mdx"
run: pnpm tsx scripts/check-frontmatter.ts {staged_files}
check-mdx-length:
glob: "packages/content/data/websites/*.mdx"
run: pnpm tsx scripts/check-mdx-length.ts {staged_files}
# TypeScript as casts validation
check-as-casts:
glob: "**/*.{ts,tsx}"
exclude:
- "**/node_modules/**"
- "**/*.test.*"
- "**/*.spec.*"
run: node scripts/validation/check-as-casts.js {staged_files}
# Barrel files validation
check-barrel-files:
glob: "**/index.{js,ts,jsx,tsx}"
exclude: "**/node_modules/**"
run: node scripts/validation/check-barrel-files.js {staged_files}
# Console logs validation
check-console-logs:
glob: "**/*.{js,jsx,ts,tsx}"
exclude:
- "**/node_modules/**"
- "**/*.test.*"
- "**/*.spec.*"
- "scripts/**"
- "**/scripts/**"
- "packages/validators/**"
- "**/packages/validators/**"
- "packages/generator/**"
- "**/packages/generator/**"
- "packages/cli/**"
- "**/packages/cli/**"
run: node scripts/validation/check-console-logs.js {staged_files}
# Directory structure validation
check-directory-structure:
run: node scripts/validation/check-directory-structure.js
# File complexity validation
check-file-complexity:
glob: "**/*.{js,jsx,ts,tsx}"
exclude:
- "**/node_modules/**"
- "**/*.test.*"
- "**/*.spec.*"
run: node scripts/validation/check-file-complexity.js {staged_files}
# JSDoc validation
check-jsdoc:
glob: "**/*.{js,jsx,ts,tsx}"
exclude:
- "**/node_modules/**"
- "**/*.test.*"
- "**/*.spec.*"
run: node scripts/validation/check-jsdoc.js {staged_files}
# Relative imports validation
check-relative-imports:
glob: "apps/web/**/*.{ts,tsx,js,jsx}"
exclude: "apps/web/**/node_modules/**"
run: pnpm tsx scripts/check-relative-imports.ts {staged_files}
# Test modified test files
test-modified:
glob: "apps/web/**/*.{test,spec}.{js,ts,tsx}"
run: cd apps/web && pnpm test:related {staged_files}
# Pre-push validation
pre-push:
commands:
# Run tests
test-all:
run: turbo test --filter=web
# Commit message validation
commit-msg:
commands:
lint-commit-message:
run: pnpm commitlint --edit {1}