Skip to content

Instantly share code, notes, and snippets.

@babldev
Created April 27, 2022 23:41
Show Gist options
  • Select an option

  • Save babldev/9e0e770fc541711b47b587d6aa45000f to your computer and use it in GitHub Desktop.

Select an option

Save babldev/9e0e770fc541711b47b587d6aa45000f to your computer and use it in GitHub Desktop.

Revisions

  1. babldev created this gist Apr 27, 2022.
    23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    repos:
    - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.1.0
    hooks:
    - id: trailing-whitespace
    - id: end-of-file-fixer
    - id: check-yaml
    - id: check-added-large-files
    - repo: https://github.com/pre-commit/mirrors-eslint
    rev: v8.12.0
    hooks:
    - id: eslint
    files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
    types: [file]
    args: ['--fix']
    - repo: local
    hooks:
    - id: typescript-check
    name: typescript-check
    entry: npx tsc
    language: system
    types_or: [ts, tsx]
    pass_filenames: false