Skip to content

Add Husky pre-commit hooks with lint-staged #49

Description

@PAMulligan

Summary

Standardize formatting and linting across widget/ and worker/ with shared config, and block bad commits at the local level via Husky + lint-staged.

Motivation

The project is already large enough that inconsistent style and lint drift will create review friction. Locking this in now is much cheaper than retrofitting later.

Acceptance Criteria

  • Root eslint.config.js (flat config) with shared base + per-package overrides for widget (React) and worker (Cloudflare)
  • prettier configured with .editorconfig and a .prettierignore
  • Husky + lint-staged: eslint --fix and prettier --write on staged files
  • commitlint enforcing Conventional Commits (matches existing branch-prefix convention)
  • CI job runs pnpm lint and pnpm format:check and fails on violations
  • CONTRIBUTING.md updated with the new toolchain

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions