Skip to content

Commit 2769847

Browse files
committed
- Refactoring: Avoid checking for preferred name for example (as there are no official synonyms)
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
1 parent b604128 commit 2769847

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rules/requireExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default iterateJsdoc(({
66
report,
77
utils
88
}) => {
9-
const targetTagName = utils.getPreferredTagName('example');
9+
const targetTagName = 'example';
1010

1111
const functionExamples = _.filter(jsdoc.tags, {
1212
tag: targetTagName

src/rules/validTypes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {parse} from 'jsdoctypeparser';
22
import iterateJsdoc from '../iterateJsdoc';
33

44
/** @param {string} tag */
5-
const isLink = (tag) => {
5+
const isInlineTag = (tag) => {
66
return /^(@link|@linkcode|@linkplain|@tutorial) /.test(tag);
77
};
88

@@ -47,7 +47,7 @@ export default iterateJsdoc(({
4747
return;
4848
}
4949
validTypeParsing(tag.name);
50-
} else if (tag.type && !isLink(tag.type)) {
50+
} else if (tag.type && !isInlineTag(tag.type)) {
5151
validTypeParsing(tag.type);
5252
}
5353
});

0 commit comments

Comments
 (0)