feat(linter/jsdoc): Implement require-yields rule (#3150)

Part of #1170 

>
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md

With:

- Fix typo of JSDocPluginSettings
- Update utils/jsdoc
This commit is contained in:
Yuji Sugiura 2024-05-02 23:49:19 +09:00 committed by GitHub
parent d7a8345e4c
commit 5a1d63afed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 2102 additions and 5 deletions

View file

@ -19,7 +19,7 @@ pub struct JSDocPluginSettings {
pub override_replaces_docs: bool,
/// Only for `require-(yields|returns|description|example|param|throws)` rule
#[serde(default, rename = "augmentsExtendsReplacesDocs")]
pub arguments_extends_replaces_docs: bool,
pub augments_extends_replaces_docs: bool,
/// Only for `require-(yields|returns|description|example|param|throws)` rule
#[serde(default, rename = "implementsReplacesDocs")]
pub implements_replaces_docs: bool,
@ -79,7 +79,7 @@ impl Default for JSDocPluginSettings {
// Exists only for these defaults
ignore_replaces_docs: true,
override_replaces_docs: true,
arguments_extends_replaces_docs: false,
augments_extends_replaces_docs: false,
implements_replaces_docs: false,
exempt_destructured_roots_from_checks: false,
tag_name_preference: FxHashMap::default(),
@ -202,7 +202,7 @@ mod test {
assert_eq!(settings.tag_name_preference.len(), 0);
assert!(settings.ignore_replaces_docs);
assert!(settings.override_replaces_docs);
assert!(!settings.arguments_extends_replaces_docs);
assert!(!settings.augments_extends_replaces_docs);
assert!(!settings.implements_replaces_docs);
let settings = JSDocPluginSettings::default();
@ -212,7 +212,7 @@ mod test {
assert_eq!(settings.tag_name_preference.len(), 0);
assert!(settings.ignore_replaces_docs);
assert!(settings.override_replaces_docs);
assert!(!settings.arguments_extends_replaces_docs);
assert!(!settings.augments_extends_replaces_docs);
assert!(!settings.implements_replaces_docs);
}

View file

@ -372,6 +372,7 @@ mod jsdoc {
pub mod require_property_description;
pub mod require_property_name;
pub mod require_property_type;
pub mod require_yields;
}
mod tree_shaking {
@ -710,5 +711,6 @@ oxc_macros::declare_all_lint_rules! {
jsdoc::require_property_type,
jsdoc::require_property_name,
jsdoc::require_property_description,
jsdoc::require_yields,
tree_shaking::no_side_effects_in_initialization,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,610 @@
---
source: crates/oxc_linter/src/tester.rs
expression: require_yields
---
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ function * quux (foo) { yield foo; }
· ────────────────────────────────────
6 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux (foo) {
6 │ │ someLabel: {
7 │ │ yield foo;
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux (foo) {
6 │ │
7 │ │ const a = yield foo;
8 │ ╰─▶ }
9 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux (foo) {
6 │ │ yield foo;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux() {
6 │ │ yield 5;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux() {
6 │ │ yield;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:33]
4 │ */
5 │ ╭─▶ const quux = async function * () {
6 │ │ yield;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:21]
4 │ */
5 │ ╭─▶ async function * quux () {
6 │ │ yield;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ yield;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:6:25]
5 │ */
6 │ function*() {}
· ──────────────
7 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Duplicate `@yields` tags.
╭─[require_yields.tsx:4:23]
3 │ * @yields {undefined}
4 │ * @yields {void}
· ───────
5 │ */
╰────
help: Remove redundunt `@yields` tag.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux (foo) {
6 │ │ yield 'bar';
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:16]
4 │ */
5 │ ╭─▶ async function * foo(a) {
6 │ │ return;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:16]
4 │ */
5 │ ╭─▶ async function * foo(a) {
6 │ │ yield Promise.all(a);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:6:25]
5 │ */
6 │ ╭─▶ * quux () {
7 │ │ yield;
8 │ ╰─▶ }
9 │ }
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:16]
4 │ */
5 │ ╭─▶ async function * foo(a) {
6 │ │ yield Promise.all(a);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ if (true) {
7 │ │ yield;
8 │ │ }
9 │ │ yield true;
10 │ ╰─▶ }
11 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ if (yield false) {
7 │ │
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ b ? yield false : true
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ try {
7 │ │ yield true;
8 │ │ } catch (err) {
9 │ │ }
10 │ │ yield;
11 │ ╰─▶ }
12 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ try {
7 │ │ } finally {
8 │ │ yield true;
9 │ │ }
10 │ │ yield;
11 │ ╰─▶ }
12 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ try {
7 │ │ } finally {
8 │ │ yield true;
9 │ │ }
10 │ │ yield;
11 │ ╰─▶ }
12 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ try {
7 │ │ yield;
8 │ │ } catch (err) {
9 │ │ }
10 │ │ yield true;
11 │ ╰─▶ }
12 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ try {
7 │ │ something();
8 │ │ } catch (err) {
9 │ │ yield true;
10 │ │ }
11 │ │ yield;
12 │ ╰─▶ }
13 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ switch (true) {
7 │ │ case 'abc':
8 │ │ yield true;
9 │ │ }
10 │ │ yield;
11 │ ╰─▶ }
12 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ switch (true) {
7 │ │ case 'abc':
8 │ │ yield;
9 │ │ }
10 │ │ yield true;
11 │ ╰─▶ }
12 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ for (const i of abc) {
7 │ │ yield true;
8 │ │ }
9 │ │ yield;
10 │ ╰─▶ }
11 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ for (const a in b) {
7 │ │ yield true;
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ for (let i=0; i<n; i+=1) {
7 │ │ yield true;
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ while(true) {
7 │ │ yield true
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ do {
7 │ │ yield true
8 │ │ }
9 │ │ while(true)
10 │ ╰─▶ }
11 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ if (true) {
7 │ │ yield true;
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ var a = {};
7 │ │ with (a) {
8 │ │ yield true;
9 │ │ }
10 │ ╰─▶ }
11 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ if (true) {
7 │ │ yield;
8 │ │ } else {
9 │ │ yield true;
10 │ │ }
11 │ │ yield;
12 │ ╰─▶ }
13 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ if (false) {
7 │ │ return;
8 │ │ }
9 │ │ return yield true;
10 │ ╰─▶ }
11 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ [yield true];
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ const [a = yield true] = [];
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ a || (yield true);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ (r = yield true);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ a + (yield true);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ a, yield true;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ +(yield);
7 │ │ [...yield];
8 │ │ [...+(yield true)];
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ someLabel: {
7 │ │ yield true;
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ var obj = {
7 │ │ [someKey]: 'val',
8 │ │ anotherKey: yield true
9 │ │ }
10 │ ╰─▶ }
11 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ var obj = {
7 │ │ [yield true]: 'val',
8 │ │ }
9 │ ╰─▶ }
10 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ `abc${yield true}`;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ tagTemp`abc${yield true}`;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ a.b[yield true].c;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ abc?.[yield true].d?.e(yield true);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ abc?.[yield true].d?.e(yield true);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ const [a = yield true] = arr;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ const {a = yield true} = obj;
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): Missing JSDoc `@yields` declaration for generator function.
╭─[require_yields.tsx:5:20]
4 │ */
5 │ ╭─▶ function * quux () {
6 │ │ import(yield true);
7 │ ╰─▶ }
8 │
╰────
help: Add `@yields` tag to the JSDoc comment.
⚠ eslint-plugin-jsdoc(require-yields): `@yields` tag is required when using `@generator` tag.
╭─[require_yields.tsx:4:25]
3 │ * fail(`@generator`+missing `@yields`, with config)
4 │ * @generator
· ──────────
5 │ */
╰────
help: Add `@yields` tag to the JSDoc comment.

View file

@ -1,6 +1,7 @@
use crate::{config::JSDocPluginSettings, context::LintContext, AstNode};
use oxc_ast::AstKind;
use oxc_semantic::JSDoc;
use rustc_hash::FxHashSet;
/// JSDoc is often attached on the parent node of a function.
///
@ -27,10 +28,14 @@ pub fn get_function_nearest_jsdoc_node<'a, 'b>(
// Whether the node has attached JSDoc or not is determined by `JSDocBuilder`
while ctx.jsdoc().get_all_by_node(current_node).is_none() {
// Tie-breaker, otherwise every loop will end at `Program` node!
// Maybe more checks should be added
match current_node.kind() {
AstKind::VariableDeclaration(_)
| AstKind::MethodDefinition(_)
| AstKind::PropertyDefinition(_) => return None,
| AstKind::PropertyDefinition(_)
// /** This JSDoc should NOT found for `ArrowFunctionExpression` callback */
// function outer() { inner(() => {}) }
| AstKind::CallExpression(_) => return None,
_ => current_node = ctx.nodes().parent_node(current_node.id())?,
}
}
@ -69,3 +74,27 @@ pub fn should_ignore_as_private(jsdoc: &JSDoc, settings: &JSDocPluginSettings) -
false
}
pub fn should_ignore_as_avoid(
jsdoc: &JSDoc,
settings: &JSDocPluginSettings,
exempted_tag_names: &[String],
) -> bool {
let mut ignore_tag_names =
exempted_tag_names.iter().map(std::convert::Into::into).collect::<FxHashSet<_>>();
if settings.ignore_replaces_docs {
ignore_tag_names.insert(settings.resolve_tag_name("ignore"));
}
if settings.override_replaces_docs {
ignore_tag_names.insert(settings.resolve_tag_name("override"));
}
if settings.augments_extends_replaces_docs {
ignore_tag_names.insert(settings.resolve_tag_name("augments"));
ignore_tag_names.insert(settings.resolve_tag_name("extends"));
}
if settings.implements_replaces_docs {
ignore_tag_names.insert(settings.resolve_tag_name("implements"));
}
jsdoc.tags().iter().any(|tag| ignore_tag_names.contains(tag.kind.parsed()))
}