-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
44 lines (40 loc) · 1.17 KB
/
.pre-commit-config.yaml
File metadata and controls
44 lines (40 loc) · 1.17 KB
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
41
42
43
44
# This configuration sets up pre-commit hooks to automatically
# fix formatting, check types, and run tests before commits/pushes.
# Helps maintain code quality and avoid CI failures.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-case-conflict
- id: check-json
- id: pretty-format-json
args: ['--autofix']
- repo: local
hooks:
- id: eslint
name: ESLint
entry: npx eslint --fix
language: node
types: [javascript, typescript]
require_serial: false
- id: prettier
name: Prettier
entry: npx prettier --write
language: node
types: [javascript, typescript, json, markdown]
require_serial: false
- id: type-check
name: TypeScript Type Check
entry: npx tsc --noEmit
language: node
types: [typescript]
pass_filenames: false
- id: tests
name: Jest Tests
entry: npm run test:ci
language: node
pass_filenames: false
stages: [pre-push]