Skip to content

[DEVOPS] npm run lint can never pass — no ESLint config exists, so CI is red on every commit #9

Backlog

Description

@urbantech

Summary

npm run lint runs eslint . --ext .ts,.tsx, but there is no ESLint
configuration anywhere in this repo
— not at root, not under examples/. The
command therefore exits 2 on every commit:

ESLint couldn't find a configuration file.
ESLint looked for configuration files in .../TypeScript-SDK/examples and its ancestors.
Process completed with exit code 2

lint is part of the test job, so the whole Test workflow fails. It is red
on the last 4 main runs: 6f46cfe7, a2dd75f1, 3d8ca5fa, 24368340.

Why it matters beyond the lint itself

The job matrix has 9 legs (ubuntu/macos/windows × Node 16/18/20). When the first
leg exits non-zero, the other 8 are CANCELLED — so the actual test legs
never report at all:

CANCELLED: 8
FAILURE:   1   <- the lint leg

Two consequences:

  1. No check in this repo produces signal. A contributor cannot tell a real
    regression from the standing failure without checking out the branch and
    running the suite by hand.
  2. A cancelled check reads as benign. Sitting next to one failure, 8
    cancellations look like "nothing to see", when in fact the tests were never
    run. Worth treating cancellations as failures in any CI assertion.

For reference, the suite itself is healthy — a local run on a clean npm ci:

Test Suites: 8 passed, 8 total
Tests:       216 passed, 216 total

So this is purely a configuration gap, not a code-quality problem.

Fix options

  1. Add a config — eslint.config.js (flat, ESLint 9 style) or .eslintrc.json
    for the pinned 8.57.1. Note examples/ contains basic-usage.js and
    react-example.tsx, so decide whether examples are linted or ignored.
  2. Scope the lint — eslint src --ext .ts,.tsx rather than ., which also
    avoids linting build output and examples.
  3. Decouple from tests — make lint its own job so a lint failure does not
    cancel the test matrix. Worth doing regardless of 1 or 2.

Option 3 plus either 1 or 2 is probably the right combination: lint and tests
should fail independently.

Found while verifying #8, whose single failing check was confirmed pre-existing
by the main history above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions