mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 12:30:08 -06:00
chore: Setup code formatting and linting
- Add `.editorconfig` for editor consistency. - Configure GitHub Actions workflow for linting (`.github/workflows/lint.yml`). - Add pre-commit hooks for automated checks (`.pre-commit-config.yaml`). - Configure Prettier and exclusions (`.prettierrc.yaml`, `.prettierignore`). - Update VS Code extensions to include formatting tools (`.vscode/extensions.json`). - Adjust VS Code settings for auto-formatting (`.vscode/settings.json`).
This commit is contained in:
committed by
James Murdza
parent
93e64cb58c
commit
e04bfaea5e
40
.github/workflows/lint.yml
vendored
Normal file
40
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Lint & Format Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint & Format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
|
||||
- run: pip install uv
|
||||
- run: uv sync
|
||||
|
||||
# Python checks (isort, black, ruff, mypy)
|
||||
- run: uv run isort --check-only .
|
||||
- run: uv run black --check .
|
||||
- run: uv run ruff check --ignore E501,E402 .
|
||||
- run: uv run mypy .
|
||||
|
||||
# JS/TS/Markdown/YAML checks
|
||||
- run: uv run prettier --check "**/*.{ts,tsx,js,jsx,json,md,yaml,yml}"
|
||||
Reference in New Issue
Block a user