Skip to content

Instantly share code, notes, and snippets.

@zsajjad
Last active Aug 25, 2021
Embed
What would you like to do?
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