Skip to content

Linting: end-to-end test with real oxlint/eslint #11

Description

@mikn

Problem

The ts_lint rule exists and passes a test with a fake linter (tests/lint/fake_linter.sh). It has never been tested end-to-end with a real linter binary (oxlint or eslint).

Gazelle auto-detects lint configs (oxlint.json, .eslintrc.*, eslint.config.*) and generates ts_lint targets, but:

  1. The generated targets reference @npm//:oxlint_bin or @npm//:eslint_bin which may not exist
  2. No example demonstrates real linting
  3. The ts_lint rule's interaction with the _validation output group is tested with a stub

Expected behavior

  • A test that runs oxlint on real TypeScript code and verifies it catches a lint violation
  • A test that verifies the _validation output group fails when lint violations exist
  • An example with real lint configuration

Suggested fix

  1. Add oxlint to tests/npm/pnpm-lock.yaml
  2. Create tests/lint_real/ with an oxlint.json config and a .ts file with a known violation
  3. Verify bazel build //tests/lint_real:lint --output_groups=+_validation fails correctly
  4. Verify clean code passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions