Skip to content

Commit

Permalink
test: example for inline link targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed May 23, 2023
1 parent 30f62ed commit d730290
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/rules/require-param.md
Original file line number Diff line number Diff line change
Expand Up @@ -1812,5 +1812,9 @@ function foo(this: T, bar: number): number {
console.log(this.name);
return bar;
}

/** {@link someOtherval} */
function a (b) {}
// "jsdoc/require-param": ["error"|"warn", {"contexts":[{"comment":"*:not(JsdocBlock:has(JsdocInlineTag[tag=link]))","context":"FunctionDeclaration"}]}]
````

16 changes: 16 additions & 0 deletions test/rules/assertions/requireParam.js
Original file line number Diff line number Diff line change
Expand Up @@ -3525,5 +3525,21 @@ export default {
`,
parser: require.resolve('@typescript-eslint/parser'),
},
{
code: `
/** {@link someOtherval} */
function a (b) {}
`,
options: [
{
contexts: [
{
comment: '*:not(JsdocBlock:has(JsdocInlineTag[tag=link]))',
context: 'FunctionDeclaration',
},
],
},
],
},
],
};

0 comments on commit d730290

Please sign in to comment.