Files
computer/.pre-commit-config.yaml
Aditya Bavadekar 51ee79a9d2 chore: set up pre-commit hooks and CI/CD workflow
- Add a new GitHub Actions workflow (`lint.yml`)
- Update `CONTRIBUTING.md` and `Development.md` to reflect the new linting setup and guide contributors.
- Include a TypeScript type checking script (`typescript-typecheck.js`)
2025-10-22 11:10:21 -07:00

51 lines
1.3 KiB
YAML

repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- id: prettier
name: Prettier (TS/JS/JSON/Markdown/YAML)
entry: prettier --write
language: node
files: \.(ts|tsx|js|jsx|json|md|yaml|yml)$
- repo: local
hooks:
- id: tsc
name: TypeScript type check
entry: node ./scripts/typescript-typecheck.js
language: node
- repo: https://github.com/PyCQA/isort
rev: 7.0.0
hooks:
- id: isort
name: isort code formatter
language_version: python3.11
args: ['--profile', 'black']
files: \.(py)$
- repo: https://github.com/psf/black
rev: 25.9.0
hooks:
- id: black
name: Black code formatter
language_version: python3.11
files: \.(py)$
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.14.1
hooks:
- id: ruff
name: ruff linter
language_version: python3.11
args: ['--fix', '--ignore', 'E501,E402,I001,I002'] # Ignore line length, module level import not at top of file, and import sorting issues
files: \.(py)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
name: mypy type checker
language_version: python3.11
files: \.(py)$