chore: enable @antfu/eslint-config anti-slop and fix lint - #333
Conversation
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.
◈ PR Lens
Architecture 36 components touched across 7 lanes. Data flow No data-flow sequence changed in this PR. Drill down
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # pnpm-lock.yaml
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.
# Conflicts: # pnpm-lock.yaml
What
Upgrades
@antfu/eslint-configto 9.5.1, installs theeslint-plugin-slopandeslint-plugin-sonarjspeers, and turns on the anti-slop rule set with full-file inspection: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 asassertions, overlong comments, high-complexity functions), enforced in CI going forward.Notes
no-em-dashrule 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.pnpm-workspace.yamlpicks up the formatting the upgradedeslint-plugin-pnpmnow 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.