pre-commit:
  parallel: true
  commands:
    prettier:
      files: git diff --name-only @{push}
      glob: "*.{js,ts}"
      run: npx prettier --single-quote --write {files}
    linter:
      files: git diff --name-only @{push}
      glob: "*.{js,ts}"
      run: npx eslint --cache --fix --quiet --format codeframe --ext js,ts {files}
    tests:
      files: git diff --name-only @{push}
      glob: "*.{js,ts}"
      run: jest --findRelatedTests {files}

pre-push:
  parallel: true
  commands:
    packages-audit:
      tags: packages security
      run: npm run audit
    spelling:
      files: git diff --name-only HEAD @{push}
      glob: "*.md"
      run: npx yaspeller {files}
    check-links:
      files: git diff --name-only HEAD @{push}
      glob: "*.md"
      run: npx markdown-link-check {files}
