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:
Aditya Bavadekar
2025-10-21 21:27:53 +05:30
committed by James Murdza
parent 93e64cb58c
commit e04bfaea5e
12 changed files with 1659 additions and 525 deletions

40
.github/workflows/lint.yml vendored Normal file
View 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}"