-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
42 lines (37 loc) · 1021 Bytes
/
Copy path.pre-commit-config.yaml
File metadata and controls
42 lines (37 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
repos:
# Lint and format with ESLint/Prettier
- repo: local
hooks:
- id: lint
name: ESLint & TypeScript Check
entry: npm run lint
language: system
types: [typescript, tsx]
pass_filenames: false
- id: typecheck
name: TypeScript Type Check
entry: npx tsc --noEmit
language: system
types: [typescript, tsx]
pass_filenames: false
- id: build-check
name: Build Check
entry: npm run build
language: system
pass_filenames: false
stages: [pre-push]
# General file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: '\.md$'
- id: end-of-file-fixer
exclude: '\.md$'
- id: check-yaml
- id: check-json
- id: check-added-large-files
args: ['--maxkb=500']
- id: no-commit-to-branch
args: ['--branch', 'main']
stages: [pre-commit]