Skip to content

Add JS/TS and Python linting workflows#52

Merged
kaleko merged 1 commit intomainfrom
fix/lint-workflows
Mar 10, 2026
Merged

Add JS/TS and Python linting workflows#52
kaleko merged 1 commit intomainfrom
fix/lint-workflows

Conversation

@harshitkgupta
Copy link
Copy Markdown

@harshitkgupta harshitkgupta commented Mar 7, 2026

Summary

  • Add js-lint.yml: ESLint + Prettier workflow for frontend PRs
    • Uses project-local dependencies via npm ci instead of global installs
    • Covers .ts, .tsx, .js, .jsx, .css, .json, .mjs files
    • Removed continue-on-error: true so lint failures actually fail the workflow
    • Runs from frontend/ working directory using project ESLint and Prettier config
  • Add python-lint.yml: ruff check + ruff format workflow for Python PRs
    • Uses uv to install and run ruff
    • Covers all .py files

Both workflows use env variables for changed-files output to prevent script injection.

Add two GitHub Actions workflows triggered on PRs to main:
- js-lint: runs ESLint and Prettier on changed frontend files using
  project-local config and dependencies
- python-lint: runs ruff check and ruff format on changed Python files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@harshitkgupta harshitkgupta requested a review from a team March 7, 2026 05:51
@harshitkgupta harshitkgupta self-assigned this Mar 7, 2026
Copy link
Copy Markdown
Contributor

@kaleko kaleko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging, but some future things to note or consider improving:

  1. tj-actions/changed-files@v46 — This is a third-party action. It's pinned to a major version tag (v46) rather than a commit SHA. For a security-conscious project, you'd ideally pin to a full SHA (e.g., tj-actions/changed-files@)
    to prevent supply chain attacks if the tag gets moved. This is a moderate concern.

  2. Node 18 is EOL — The JS workflow uses node-version: '18'. Node 18 reached end-of-life in April 2025. Should be bumped to 20 or 22. Worth checking what the frontend's package.json specifies.

@kaleko kaleko merged commit 65f278a into main Mar 10, 2026
6 checks passed
@kaleko kaleko deleted the fix/lint-workflows branch March 10, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants