Adopt @e18e/eslint-plugin and format the repo - #12
Merged
Conversation
The plugin carries the e18e community rules for modernizing JS and cutting avoidable allocations. Registered via oxlint jsPlugins; its ESLint preset configs are flat-config objects oxlint cannot consume, so the rules are listed individually. Seven of its 27 rules need typescript-eslint parser services and throw under oxlint, so they are left out with a note. prefer-static-regex is off on purpose: V8 caches compiled patterns by pattern+flags, so hoisting a one-shot literal saves an allocation rather than a recompile, and it fired on 115 ordinary validators and guard clauses where moving the regex away from the line that reads it costs more than it buys. The rest are fixed. Two localeCompare comparators now sort by codepoint, matching the rule already documented in agent-hash.ts: collation must not depend on host locale/ICU. The two delete sites are suppressed with reasons — in publicClientJwk the key must be absent, not present-and-undefined, because it is the private key component. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Thirteen files had drifted from the oxfmt config — the formatter is not wired to a pre-commit hook (CI is the enforcement gate), so drift accumulated silently and showed up as unrelated reflow noise in the previous change. Whitespace only: no identifiers, literals, or control flow are touched, and lint, typecheck, build, and the full test suite are unchanged after it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent commits, kept separate so the formatting noise does not bury the logic change.
Adopt @e18e/eslint-plugin and fix the findings it surfaced
Registers the e18e community rules (modernization + performance) through oxlint's
jsPlugins. Its ESLint preset configs are flat-config objects oxlint cannot consume, so rules are listed individually.prefer-static-regexis off deliberately. V8 caches compiled patterns by pattern+flags, so hoisting a one-shot literal saves an allocation rather than a recompile, and it fired on 115 ordinary validators and guard clauses.Array.from(matchAll, ...)in the CloudFront alias reconciler drops an intermediate array, and twolocaleComparecomparators now sort by codepoint — matching the rule already documented inagent-hash.ts, that collation must not depend on host locale/ICU.deletesites are suppressed with reasons. InpublicClientJwkthe key must be absent rather than present-and-undefined, because it is the private key component.Format the repo with oxfmt
13 files had drifted from the oxfmt config — there is no pre-commit hook, so drift accumulated silently. Whitespace only.
No changeset: both commits are internal-only per
DEVELOPMENT.md(lint config, a refactor, formatting).Verified locally: build, lint, typecheck, knip,
--frozen-lockfile, and 331 tests all pass.🤖 Generated with Claude Code