-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
46 lines (43 loc) · 1.27 KB
/
.pre-commit-config.yaml
File metadata and controls
46 lines (43 loc) · 1.27 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
45
46
repos:
# JavaScript/TypeScript linting and formatting
- repo: local
hooks:
- id: eslint
name: ESLint
entry: bash -c 'npm run lint -- --fix "$@" || npm run lint -- "$@"' --
language: system
files: \.(js|jsx|ts|tsx)$
pass_filenames: true
require_serial: false
# TypeScript type checking
- repo: local
hooks:
- id: typescript
name: TypeScript Check
entry: bash -c 'npx tsc --noEmit --skipLibCheck'
language: system
files: \.(ts|tsx)$
pass_filenames: false
require_serial: true
# Python linting and formatting with ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
# Run the linter
- id: ruff
args: [--fix]
files: '(\.py$|^bin/[^/]+$)' # Include .py files and bin scripts
# Run the formatter
- id: ruff-format
files: '(\.py$|^bin/[^/]+$)' # Include .py files and bin scripts
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-json
- id: check-merge-conflict