Skip to content

Extend lint coverage to CLI and config files with context-specific overrides #99

@d-oit

Description

@d-oit

Summary

The ESLint config currently ignores cli and *.config.js, *.config.ts, vite.config.ts, and vitest.config.ts, while the TypeScript config includes cli and the repository relies on multiple executable config files for build and test behavior.

Problem

Important code paths that influence packaging, tests, and automation may be typechecked or executed without being linted. That creates a quality gap exactly where subtle environment mistakes are common, such as path handling, plugin wiring, and CI-specific conditions.

Why this matters

Config and CLI code often changes less frequently than app code, which means it benefits from automated guardrails when it does change. Because this repository already enforces quality at commit time, widening the lint surface would make that gate more consistent.

Proposed scope

  • Stop globally excluding CLI and config files from ESLint.
  • Add a Node-specific ESLint override for config files and CLI code.
  • Keep browser-specific rules scoped to browser code so the config remains accurate per runtime.
  • Ensure the local quality gate checks these files as well.

Acceptance criteria

  • CLI files are linted.
  • Build and test config files are linted with Node-appropriate settings.
  • The lint command remains stable in local and CI environments.
  • Any new override structure is documented for contributors.

Suggested implementation notes

  • Use files-based flat-config entries to target cli/**/*, *.config.*, and tool-specific config files.
  • Apply Node globals and module expectations only where needed, rather than weakening rules for the whole project.
  • Consider keeping especially slow checks for CI if pre-commit latency becomes noticeable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions