Description
The escape-inline-tags rule incorrectly flags scoped npm package names inside {@link} declaration references as unescaped inline tags.
Example
TSDoc declaration references can target types in scoped npm packages using the package#member syntax defined in the TSDoc spec:
/**
* Use this CodeMirror {@link @codemirror/state#StateField} to get a reference to the EditorView.
*/
The rule sees @codemirror inside the {@link} block and reports it as an unescaped inline tag, suggesting it should be escaped to \@codemirror. However, escaping breaks API Extractor / TSDoc resolution, which requires the literal @ to identify the scoped package name.
Current workaround
Adding the scope name to allowedInlineTags:
'jsdoc/escape-inline-tags': ['error', {
allowedInlineTags: ['codemirror']
}]
This works but is a hack — every new scoped package referenced in {@link} targets requires a new entry.
Expected behavior
The rule should not flag @scope as an unescaped inline tag when it appears inside a {@link} (or {@inheritDoc}, etc.) target, since @scope/package#member is valid TSDoc declaration reference syntax.
Environment
- eslint-plugin-jsdoc: 62.9.0
- Node: 25.9.0
- ESLint: 10.4.0 (flat config)
Description
The
escape-inline-tagsrule incorrectly flags scoped npm package names inside{@link}declaration references as unescaped inline tags.Example
TSDoc declaration references can target types in scoped npm packages using the
package#membersyntax defined in the TSDoc spec:The rule sees
@codemirrorinside the{@link}block and reports it as an unescaped inline tag, suggesting it should be escaped to\@codemirror. However, escaping breaks API Extractor / TSDoc resolution, which requires the literal@to identify the scoped package name.Current workaround
Adding the scope name to
allowedInlineTags:This works but is a hack — every new scoped package referenced in
{@link}targets requires a new entry.Expected behavior
The rule should not flag
@scopeas an unescaped inline tag when it appears inside a{@link}(or{@inheritDoc}, etc.) target, since@scope/package#memberis valid TSDoc declaration reference syntax.Environment