Skip to content

chore: remove --max-warnings=0 from eslint commands - #1989

Merged
dinwwwh merged 1 commit into
mainfrom
chore/remove-eslint-max-warnings
Sep 6, 2026
Merged

chore: remove --max-warnings=0 from eslint commands#1989
dinwwwh merged 1 commit into
mainfrom
chore/remove-eslint-max-warnings

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Sep 6, 2026

Copy link
Copy Markdown
Member

Drops --max-warnings=0 from every eslint invocation so lint warnings no longer fail the check; only errors do.

Applies to the lint, lint:fix, and sponsors:sync scripts, the lint-staged pre-commit command, and the Claude Code post-edit hook. Same change is being applied to middleapi/openapi-spec and middleapi/standardserver.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
orpc 227316d Commit Preview URL

Branch Preview URL
Sep 06 2026, 08:03 AM

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Root scripts — dropped --max-warnings=0 from lint, lint:fix, and sponsors:sync in package.json.
  • lint-staged — pre-commit eslint invocation drops the flag, retains --no-warn-ignored.
  • Claude Code hook — PostToolUse eslint invocation in .claude/settings.json drops the flag, retains --no-warn-ignored.

Complete and consistent: a repo-wide grep finds no remaining --max-warnings=0 occurrences, and eslint . on this branch currently emits zero warnings and exits 0 — so the change is purely forward-looking. CI's lint_and_typecheck job and the sponsors-sync workflow both call the updated scripts, so the relaxed gate applies there as intended.

ℹ️ Secondary role of --max-warnings=0 is dropped

On the root lint script the flag also did double duty: it turned ESLint's "file ignored because no matching configuration was supplied" warning into a hard failure — the mechanism that catches new file types passed to eslint . but not covered by eslint.config.js (this repo previously needed a config override when .astro files were introduced under apps/content). After this change those warnings still print in CI (the root script doesn't pass --no-warn-ignored) but no longer fail the check. Today's impact is zero, and the change matches the stated intent — just flagging so the file-coverage guard's loss is a conscious tradeoff rather than a surprise.

Technical details
# File-coverage guard removal

## Affected sites
- package.json:13 (`"lint": "eslint ."`) — no longer fails on "no matching configuration" warnings

## Required outcome
- Awareness only: new file types uncovered by eslint.config.js (like the historical `.astro` case under apps/content) will silently pass lint instead of failing; previously `--max-warnings=0` made that warning exit non-zero.

## Open questions for the human
- Is the file-coverage guard still wanted by some other means (e.g. a CI check for that specific warning), or is fully warning-tolerant linting the intent?

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dinwwwh
dinwwwh merged commit 89dc90d into main Sep 6, 2026
9 of 10 checks passed
@codspeed-hq

codspeed-hq Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 30 untouched benchmarks


Comparing chore/remove-eslint-max-warnings (227316d) with main (cdd2a96)

Open in CodSpeed

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