forked from langchain-ai/langsmith-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
62 lines (54 loc) · 2.06 KB
/
.pre-commit-config.yaml
File metadata and controls
62 lines (54 loc) · 2.06 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Pre-commit hooks that auto-fix formatting and linting issues
# Install: pip install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
repos:
- repo: local
hooks:
# ==========================================================================
# Python Checks
# ==========================================================================
# Python - auto-format with ruff
- id: python-format
name: Python Ruff Format
entry: bash -c 'cd python && uv run ruff format .'
language: system
files: ^python/.*\.py$
pass_filenames: false
# Python - lint and auto-fix with ruff
- id: python-lint-ruff
name: Python Ruff Lint
entry: bash -c 'cd python && uv run ruff check --fix .'
language: system
files: ^python/.*\.py$
pass_filenames: false
# Python - type check with mypy (cannot auto-fix)
- id: python-mypy
name: Python MyPy Type Check
entry: bash -c 'cd python && uv run mypy langsmith'
language: system
files: ^python/langsmith/.*\.py$
pass_filenames: false
# ==========================================================================
# JavaScript/TypeScript Checks
# ==========================================================================
# JS - auto-format with prettier
- id: js-format
name: JS Prettier Format
entry: bash -c 'cd js && yarn run format'
language: system
files: ^js/src/.*\.(ts|tsx|mts)$
pass_filenames: false
# JS - lint and auto-fix with eslint
- id: js-lint
name: JS ESLint
entry: bash -c 'cd js && yarn run lint:fix'
language: system
files: ^js/src/.*\.(ts|js)$
pass_filenames: false
# JS - type check with TypeScript (cannot auto-fix)
- id: js-typecheck
name: JS TypeScript Type Check
entry: bash -c 'cd js && yarn run check:types'
language: system
files: ^js/src/.*\.(ts|tsx|mts)$
pass_filenames: false