Skip to content

Instantly share code, notes, and snippets.

@zsajjad
Last active August 25, 2021 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsajjad/8db1f45eb7bac3279acb573266a404b4 to your computer and use it in GitHub Desktop.
Save zsajjad/8db1f45eb7bac3279acb573266a404b4 to your computer and use it in GitHub Desktop.
Lefthook for React/ReactNative apps
// cSpell:word commitlint typecheck
pre-commit:
parallel: true
commands:
type-check:
glob: '*.{ts,tsx}'
run: yarn typecheck
lint:
glob: '*.{js,ts,jsx,tsx}'
run: yarn lint:eslint:fix {staged_files}
spelling:
glob: '*.{js,ts,jsx,tsx,md}'
run: yarn cspell {staged_files}
markdown-link-check:
glob: '*.md'
run: npx markdown-link-check {staged_files}
commit-msg:
parallel: true
commands:
lint-commit-msg:
run: npx commitlint --edit
spell-check:
run: yarn cspell --no-summary {1}
pre-push:
parallel: true
commands:
test:
run: yarn test
packages-audit:
run: yarn audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment