Repository navigation
feat(webpack): add inherit-jsdoc rule with auto-fix - #198
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: c4a0ec2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Ports tooling's `inherit-types` check to a type-aware ESLint rule: an overriding method must carry the JSDoc of the method it overrides, with `@abstract` dropped. The fix inserts a missing block and rewrites a drifted one. Also adds the `webpack/types` config that wires up the TypeScript parser the rule needs, and fixes `require-license-comment` to read a comment's `range` rather than espree's non-standard `start`/`end`, which that parser does not set.
alexander-akait
force-pushed
the
feat/inherit-jsdoc-rule
branch
from
September 12, 2026 19:38
6bd7462 to
c4a0ec2
Compare
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.
Summary
Ports the
inherit-typescheck from thetoolingrepo to a type-aware ESLint rule, continuing the move of webpack'slint:specialchecks into this config (afterwebpack/valid-schemain #192 andwebpack/format-schemain #195).webpack/inherit-jsdocrequires an overriding method to carry the JSDoc of the method it overrides, with@abstractdropped, and auto-fixes both a missing block and one that has drifted. The newwebpack/typesconfig wires up the TypeScript parser the rule needs.It also fixes
webpack/require-license-comment, which read espree's non-standardstart/endon comments —@typescript-eslint/parserdoes not set those, so the rule failed on every file the new config touches.What kind of change does this PR introduce?
feat
Did you add tests for your changes?
Yes — fixtures in
validation/webpack/lib/covering a three-level inheritance chain and a method with no base declaration, linted by the repo's ownlintrun.Parity against the script it replaces was verified two ways on webpack's
lib/: on the unmodified tree both report nothing, and on a tree with 421 JSDoc blocks scrambled across 141 files (half deleted, half reworded) the rule's auto-fix and the script's--writeconverge to byte-identical output, both in three passes.Does this PR introduce a breaking change?
No —
webpack/typesis opt-in and the rule is not inrecommended.If relevant, what needs to be documented once your changes are merged or what have you already documented?
Documented in this PR: the README gains the
webpack/typesrow, thestripTagsoption, and a note that the rule needs atsconfig.jsonplustypescript, and that cross-file inheritance takes more than one--fixrun.Use of AI
Claude Code wrote the rule, the fixtures and the docs, and ran the parity verification described above, under my review and direction.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VMRMJTfRYkzN1N6GwmLbgp
Generated by Claude Code