chore: adopt shared eslint base config - #320
Merged
Merged
Conversation
Routes the copy-pasted override blocks through harlanzw({ base }) from
eslint-plugin-harlanzw 0.18.1.
commit: |
📦 Package Size✅ No notable size changes All tracked output (10)
Runtime dependencies (10)
Baseline: main_@_ab34ffa___2026-08-12 · gzip is the comparison metric · changes below 16 B gzip are ignored |
harlan-zw
force-pushed
the
chore/adopt-eslint-base
branch
from
August 18, 2026 04:05
6f28baf to
f3a754f
Compare
`/(?=(?:A|B))/` and `/(?=A|B)/` are the same regex: a lookahead already scopes its alternation. The extra group tripped `regexp/no-useless-non-capturing-group` in a file whose header says do not edit, so `pnpm lint` rewrote it on every run and the next build put it back. Fixed in the generator and regenerated. Checked both matchers over all 215 bot patterns plus negatives: identical results.
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.
❓ Type of change
📚 Description
The same three override blocks (shared ignores, node globals, test relaxations, the
examples/**/package.jsoncatalog opt-out) were copy-pasted into every one of my repos, and they drifted apart.eslint-plugin-harlanzw0.19.2 ships them asbase(), so this routes them throughharlanzw({ base: ... })and keeps only what is actually specific to this repo inline: thedocs/**ignore,e18e/prefer-static-regexoff, and the twoharlanzw/vue-*composable rules off underserver/andsrc/.Config goes 45 lines to 25. I diffed
eslint --print-configfor a src file, a test file, and a.vuefile before and after. Three resolved-severity changes across all three, no others:ts/no-use-before-defineerror to off. The old config only turned off the coreno-use-before-define, so the TS variant stayed on;base()turns off both, which was the intent.harlanzw/prefer-satisfiesandharlanzw/nuxt-no-redundant-component-importsappear as warnings. New rules in 0.18.x. Zero findings in this repo.The linted file set is identical, 129 files, and
eslint . -f jsonproduces byte-identical messages before and after.One thing I did not touch:
src/generated-bot-matcher.ts:3tripsregexp/no-useless-non-capturing-group.pnpm lintautofixes it, and the next build regenerates the unfixed version. Pre-existing, but the generator should probably emit the tighter pattern.