Skip to content

chore: enable @antfu/eslint-config anti-slop and fix lint - #333

Merged
antfu merged 6 commits into
mainfrom
shaky-walls-go
Sep 3, 2026
Merged

chore: enable @antfu/eslint-config anti-slop and fix lint#333
antfu merged 6 commits into
mainfrom
shaky-walls-go

Conversation

@antfubot

@antfubot antfubot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

What

Upgrades @antfu/eslint-config to 9.5.1, installs the eslint-plugin-slop and eslint-plugin-sonarjs peers, and turns on the anti-slop rule set with full-file inspection:

antislop: { slop: { inspection: 'full' } }

Then runs the new rules over the whole codebase and resolves every violation.

Why

Guards against low-value patterns commonly introduced by AI agents (em dashes in prose, chained as unknown as assertions, overlong comments, high-complexity functions), enforced in CI going forward.

Notes

  • The universal no-em-dash rule scans every source glob, including CSS/HTML and Vue/Svelte <style> blocks that have no JS parser configured here. Those file types are now parsed as plain text (parserPlain) so the rule reads their raw content instead of throwing parse errors.
  • Em dashes were converted to the repository's house-style spaced hyphen; only ESLint-flagged lines were touched, so markdown code fences (excluded by the rule) are untouched.
  • Remaining code-level findings were fixed properly: correct/single type assertions or typed fixtures (justified inline disables only at genuine boundaries), trimmed comments, and helpers extracted to reduce cognitive complexity. Behaviour is unchanged.
  • pnpm-workspace.yaml picks up the formatting the upgraded eslint-plugin-pnpm now enforces (key order, blank lines, minimumReleaseAgeExcludePrune).

Verification

  • pnpm lint — clean (0 problems).
  • turbo run typecheck — all packages pass.

This PR was created with the help of an agent.

Upgrade @antfu/eslint-config to 9.5.1, install the eslint-plugin-slop and
eslint-plugin-sonarjs peers, and enable the anti-slop rule set with full-file
inspection. Parse CSS/HTML/Svelte and Vue style blocks as plain text so the
universal no-em-dash rule reads their raw content instead of erroring, then
resolve every reported violation across the codebase: replace em dashes with
the house-style spaced hyphen, drop chained type assertions, trim overlong
comments, and reduce cognitive complexity by extracting helpers.

Created with the help of an agent.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 2, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~36 changed · 🔴 -0 removed · 0 flows · 61 files · commit 2f00aac


Architecture

Architecture diagram for devframes/devframe at 2f00aac

36 components touched across 7 lanes.

Open full size


Data flow

No data-flow sequence changed in this PR.


Drill down
Host Frameworks & Adapters — 6 components
🟡 CHANGED Vite Framework Kit

Vite integration kit providing single-frame and hub adapters for Vite dev servers.

🟡 CHANGED Next.js Framework Kit

Next.js adapter kit providing App Router handlers and client components.

🟡 CHANGED Nuxt Framework Kit

Nuxt module adapter wrapping the Vite framework kit for Nuxt applications.

🟡 CHANGED CAC CLI Adapter

CLI adapter mapping CAC flags and commands to devframe instances.

🟡 CHANGED MCP Server Adapter

Model Context Protocol server adapter exposing devframe tools over Streamable-HTTP.

🟡 CHANGED Standalone Dev Server

Standalone HTTP and WebSocket development server hosting devframe instances.

Devframe Core Engine — 8 components
🟡 CHANGED Host Context Assembler

Core runtime context assembling RPC, storage, events, and lifecycle management.

🟡 CHANGED Bidirectional RPC Engine

Bidirectional RPC dispatcher and function registry connecting node and browser.

🟡 CHANGED WebSocket RPC Transport

WebSocket server and client transport handling RPC duplex communication.

🟡 CHANGED SSE RPC Transport

Server-Sent Events fallback transport for environments lacking WebSocket upgrade support.

🟡 CHANGED In-Page Channel

Browser postMessage channel connecting injected page scripts directly to panel UI.

🟡 CHANGED Shared State Engine

Synchronized observable datastore propagating state snapshots and patches across peers.

🟡 CHANGED Auth & Security Gate

One-time passcode and token authorization gate guarding RPC methods.

🟡 CHANGED Persistent Storage Manager

File-backed persistent storage manager caching state and assets to disk.

Hub Orchestrator — 6 components
🟡 CHANGED Hub Node Context

Unified hub context managing multi-devframe orchestration and aggregate routing.

🟡 CHANGED Hub Docks Manager

Docks subsystem managing dock entries, layouts, and frame registrations.

🟡 CHANGED Hub Terminals Subsystem

Terminal manager managing PTY and child process streams in the hub.

🟡 CHANGED Hub Messages Subsystem

Message bus subsystem broadcasting notifications and logs across devframes.

🟡 CHANGED Hub Commands Subsystem

Command palette registration and dispatch system exposed to UI and AI agents.

🟡 CHANGED Hub Client Runtime

Browser runtime coordinating RPC, docks, and connection state for hub clients.

Built-in Devframes — 7 components
🟡 CHANGED A11y Inspector Devframe

Built-in accessibility scanner inspecting live DOM nodes via in-page channel.

🟡 CHANGED Assets Explorer Devframe

Built-in static assets explorer scanning project directories and managing uploads.

🟡 CHANGED Devframe Inspector

Introspection devframe exploring registered RPC functions, events, and state.

🟡 CHANGED Git Dashboard Devframe

Git devframe visualizing branches, commit graph, status, and diffs.

🟡 CHANGED Data Inspector Devframe

Data query and mutation devframe evaluating jora expressions against live state.

🟡 CHANGED Code Server Devframe

Web-based VS Code supervisor managing embedded code-server sessions.

🟡 CHANGED Terminals Devframe

Interactive terminal devframe connecting client terminals to hub sessions.

Shared Wire Services — 3 components
🟡 CHANGED Git Wire Service

Shared Git service executing repository operations for devframes.

🟡 CHANGED Open in Editor Service

Shared service opening source files in preferred IDE or editor.

🟡 CHANGED Shiki Syntax Highlighting Service

Shared syntax highlighting service generating highlighted HTML code tokens.

UI & Declarative Renderers — 4 components
🟡 CHANGED Hub UI Provider

Embedded dock and standalone UI provider for hub applications.

🟡 CHANGED JSON Render UI Renderer

Declarative component renderer rendering JSON-render specs in the UI.

🟡 CHANGED Design System & UnoCSS Preset

Shared UnoCSS presets, styling tokens, and design components.

🟡 CHANGED JSON Render Specification

Declarative UI specification schema and view lifecycle management.

Workspace & Tooling — 2 components
🟡 CHANGED Workspace Configuration

Monorepo workspace package configuration and lockfile dependencies.

🟡 CHANGED Documentation Site

Nuxt-based documentation site and error reference pages.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

PR Lens is free for open source. A star on the repository is what keeps it going.

🪧 More tips
  • Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • GitHub will not let you zoom an image in a comment. The link under each diagram opens it full size on a page of its own, where you can.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.
  • Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Something drawn wrong?

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
devframe Ready Ready Preview Sep 3, 2026 1:42am UTC

Replace the mechanical em-dash-to-hyphen substitution with proper rewrites:
each former em dash becomes a colon, comma, semicolon, parentheses, a split
sentence, or a connective, chosen for natural reading. Covers docs, comments,
JSDoc, and human-facing strings across the codebase.

Created with the help of an agent.
Restore the optional-chaining guard in revokeActiveConnectionsForToken: an
earlier assertion cleanup dropped it, so a context without an rpc host threw
"Cannot read properties of undefined (reading '_rpcGroup')" instead of
returning early (surfaced by host-docks.test.ts).

Update the tsnapi dts snapshots for devframe/internal and @devframes/json-render
node so the diagnostic `fix` literal types match the reworded messages.

Created with the help of an agent.
@antfu
antfu merged commit aad1fce into main Sep 3, 2026
14 checks passed
@antfu
antfu deleted the shaky-walls-go branch September 3, 2026 01:47
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.

2 participants