Skip to content

chore(lint): gate lint on errors, unblocked by an upstream parser bug (TKT-374) - #61

Open
sepo-eng wants to merge 1 commit into
devfrom
chore/tkt-374-enable-lint
Open

chore(lint): gate lint on errors, unblocked by an upstream parser bug (TKT-374)#61
sepo-eng wants to merge 1 commit into
devfrom
chore/tkt-374-enable-lint

Conversation

@sepo-eng

Copy link
Copy Markdown

Feedback 137: bun run lint is red on dev and not covered by CI, so nothing stops it drifting further.

dev was red on exactly one diagnostic, and it is not ours

Found 4994 warnings and 1 error — oxlint exits non-zero on the error alone. That error:

x '0'-prefixed octal literals and octal escape sequences are deprecated
  ,-[packages/session-ui/src/v2/components/prompt-input/index.tsx:163:19]

The class is empty:before:content-['\200B'] — the CSS escape for U+200B, inside a JSX attribute. JSX does not process backslash escapes, so the backslash reaches the CSS verbatim, which is exactly what is wanted. oxlint parses the attribute as a JS string literal and applies string-escape rules to it. Transpiling confirms the JSX semantics:

source:   class="before:content-['\200B']"
emitted:  content-['\\200B']        <- backslash preserved, i.e. runtime string is \200B

(By contrast a real JS string "\200B" is U+0080 + "B" — genuinely broken. That is the case the rule exists for, and it is not this one.)

Why it could not simply be fixed or suppressed

  • Not suppressible. --format=json returns "ruleId": null, "code": null — it is a parser diagnostic, not a rule, so neither .oxlintrc.json nor an oxlint-disable comment can reach it. Still reported by oxlint 1.60.0 and by @latest.

  • Not respellable. Tailwind v4 scans raw source text, so changing the source changes the emitted CSS. Compiled both spellings with tailwindcss 4.1.11:

    source emitted CSS
    content-['\200B'] --tw-content: '\200B' ✅ zero-width space
    content-['\\200B'] --tw-content: '\\200B' ❌ literal backslash

    So "fix the violation" would have shipped a rendering regression to satisfy a false positive.

The file is therefore excluded, with that reasoning recorded next to the entry and an explicit condition for deleting it. It loses lint coverage until oxc is fixed — stated plainly rather than left for someone to discover.

The gate

New lint.yml, mirroring typecheck.yml (same self-hosted runner, same mandatory fork-PR guard, same setup-bun). Its own job so a lint failure reports as lint rather than under a check named for something else. ~25s.

What it gates is errors — what oxlint exits non-zero on. dev also carries ~4980 warnings, which this does not gate; the workflow comment says so, so a green check is not misread as a warning-clean tree. Promoting rules or moving to --deny-warnings is a separate decision from having a gate at all, and is not made here.

After the change: bun run lintFound 4981 warnings and 0 errors, exit 0.

Noticed, not fixed

.oxlintrc.json declares "options": { "typeAware": true } three times (once near the top, twice at the end). JSON takes the last, so behaviour is unaffected, but a reader cannot tell which is authoritative. Left alone as unrelated to this change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KbNYZHcnxRCknFmhhPHe7L

…KT-374)

`bun run lint` was red on dev and outside the CI baseline (feedback 137), so
nothing stopped it drifting further. It was red on exactly one diagnostic, and
that diagnostic is an oxc parser bug rather than a defect in this tree.

packages/session-ui's prompt-input carries the CSS escape for U+200B inside a
JSX class attribute. JSX does not process backslash escapes, so the transpiler
emits the backslash verbatim, which is what the CSS needs. oxlint parses that
attribute as a JS string literal and reports a deprecated octal escape at error
severity.

It cannot be silenced by configuration -- the diagnostic carries a null ruleId,
so it is not a rule -- and the source cannot be respelled, because Tailwind v4
scans raw source text: `\\200B` compiles to `--tw-content: '\\200B'`, a literal
backslash, where `\200B` compiles to the zero-width space. Both spellings were
compiled with tailwindcss 4.1.11 to confirm that before touching anything.

So the file is excluded, with the reasoning recorded next to the entry and the
condition for removing it. It loses lint coverage until oxc is fixed.

The new job gates errors, which is what oxlint exits non-zero on. dev also
carries ~4980 warnings; they are not gated and the comment says so, so a green
check is not misread as a warning-clean tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbNYZHcnxRCknFmhhPHe7L
Copilot AI lite review requested due to automatic review settings August 13, 2026 14:37
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@sepo-eng sepo-eng changed the title ci(lint): gate lint on errors, unblocked by an upstream parser bug (TKT-374) chore(lint): gate lint on errors, unblocked by an upstream parser bug (TKT-374) Aug 13, 2026
@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant