Skip to content

chore(lint): add ESLint 9 flat config so npm run lint works - #35

Open
cryptoxdog wants to merge 1 commit into
mainfrom
chore/eslint-flat-config
Open

chore(lint): add ESLint 9 flat config so npm run lint works#35
cryptoxdog wants to merge 1 commit into
mainfrom
chore/eslint-flat-config

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

Summary

The lint script pointed at ESLint 9 with no config file present, so it exited nonzero on every invocation — the script existed but had never been runnable.

  • eslint.config.js — flat, ESM, TypeScript. Not type-aware: tsconfig excludes tests/, so recommendedTypeChecked would fail on the parser rather than on a real rule.
  • @eslint/js and typescript-eslint devDeps — the two packages ESLint 9 requires for TS.
  • no-explicit-any and no-unused-vars land as warn, not error. This codebase has never been linted; the 58 any and 15 unused-binding findings are pre-existing debt made visible rather than a wall of failures on first run. Raise both to error once cleared.
  • Also picks up the generated formatter-ownership block in AGENTS.md.

⚠️ Verification status

Written and unverified. The config is valid ESM and the devDeps are declared, but it was never executed: npm install fails with a 401 against npm.pkg.github.com for the private @quantum-l9/llm-router dependency, so node_modules is empty locally and this repo has no package-lock.json to install from.

You'll want to run npm install && npm run lint there once authenticated to the private registry before merging.

Test plan

  • Authenticate to the GitHub Packages private registry
  • npm install
  • npm run lint — expect 0 errors, warnings only

Made with Cursor

The lint script pointed at ESLint 9 with no config file present, so it exited
nonzero on every invocation — the script existed but had never been runnable.

Adds eslint.config.js (flat, ESM, TypeScript) plus the two devDeps ESLint 9
requires for TS: @eslint/js and typescript-eslint. Not type-aware: tsconfig
excludes tests/, so recommendedTypeChecked would fail on the parser rather
than on a real rule.

no-explicit-any and no-unused-vars land as warn, not error. This codebase has
never been linted; the 58 any and 15 unused-binding findings are pre-existing
debt made visible rather than a wall of failures on first run. Raise both to
error once cleared.

Also picks up the generated formatter-ownership block in AGENTS.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant