Allow scoped package names in declaration-reference inline tags#1705
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates escape-inline-tags to avoid flagging scoped package references (@scope/pkg...) when they appear inside certain declaration-reference inline tags (e.g., {@link ...}, {@inheritDoc ...}), while expanding tests and docs to cover these cases.
Changes:
- Add logic to detect when an
@...match belongs to a scoped package reference inside{@link...}/{@inheritDoc...}and skip escaping in those contexts. - Add new rule tests covering scoped-package references in inline tags and fixer behavior.
- Update documentation with new “problem” and “not a problem” examples.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/rules/assertions/escapeInlineTags.js | Adds test coverage for scoped package references in inline tags and expected fixer output. |
| src/rules/escapeInlineTags.js | Implements scoped-package detection and context-aware ignoring within certain inline tags. |
| docs/rules/escape-inline-tags.md | Documents new examples for scoped package references in inline tags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Sorry, you'd be welcome to submit the PR again if you can get those Co-pilot issues fixed... |
f4ae7b5 to
29e2c55
Compare
|
I rebased and reopened this with both review points addressed. The multiline declaration-reference case is covered now, the escaper helper is hoisted, and the generated docs are refreshed. The focused rule suite and full test suite are passing. |
|
Sorry, could you rebase again? Your PR is now priority. |
29e2c55 to
b7ee2cd
Compare
|
Rebased and pushed with no other changes; local tests are passing. |
|
🎉 This PR is included in version 63.0.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
escape-inline-tagswas reporting scoped npm package names inside declaration-reference inline tags, like{@link @codemirror/state#StateField}.This allows scoped package references inside
link,linkcode,linkplain, andinheritDocinline tags while keeping bare@scopetext and non-reference inline tag bodies reportable. I checked it with the focused rule tests passing 31 tests, generated docs check, changed-file ESLint, TypeScript, full Node 22 coverage at 3,132 passing with 100% coverage, build, andgit diff --check.Fixes #1695