Skip to content

Commit

Permalink
chore: update jsdoccomment and devDeps.
Browse files Browse the repository at this point in the history
Also:
- chore: remove test dupes and fix output=null
  • Loading branch information
brettz9 committed Apr 6, 2024
1 parent ab5624b commit e343ab5
Show file tree
Hide file tree
Showing 36 changed files with 1,287 additions and 1,825 deletions.
10 changes: 0 additions & 10 deletions docs/rules/check-line-alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,6 @@ const fn = ( lorem, sit ) => {}
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
// Message: Expected JSDoc block lines to be aligned.

/**
* Function description.
*
* @param {string} lorem Description.
* @param {int} sit Description multi words.
*/
const fn = ( lorem, sit ) => {}
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
// Message: Expected JSDoc block lines to be aligned.

/**
* Function description.
*
Expand Down
14 changes: 3 additions & 11 deletions docs/rules/check-param-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -864,17 +864,9 @@ function quux (foo, bar, ...extra) {
}

/**
* Converts an SVGRect into an object.
* @param {SVGRect} bbox - a SVGRect
*/
const bboxToObj = function ({x, y, width, height}) {
return {x, y, width, height};
};

/**
* Converts an SVGRect into an object.
* @param {SVGRect} bbox - a SVGRect
*/
* Converts an SVGRect into an object.
* @param {SVGRect} bbox - a SVGRect
*/
const bboxToObj = function ({x, y, width, height}) {
return {x, y, width, height};
};
Expand Down
9 changes: 0 additions & 9 deletions docs/rules/check-tag-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,15 +517,6 @@ function quux () {
*/
function quux () {

}
// Settings: {"jsdoc":{"tagNamePreference":{"todo":{"message":"Please use x-todo instead of todo","replacement":"x-todo"}}}}
// Message: Please use x-todo instead of todo

/**
* @todo
*/
function quux () {

}
// Settings: {"jsdoc":{"tagNamePreference":{"todo":55}}}
// Message: Invalid `settings.jsdoc.tagNamePreference`. Values must be falsy, a string, or an object.
Expand Down
9 changes: 0 additions & 9 deletions docs/rules/check-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,6 @@ function qux(baz) {
// Settings: {"jsdoc":{"preferredTypes":{"*":"aaa","abc":"Abc","string":"Str"}}}
// Message: Invalid JSDoc @param "baz" type "*"; prefer: "aaa".

/**
* @param {abc} foo
* @param {Number} bar
*/
function qux(foo, bar) {
}
// Settings: {"jsdoc":{"preferredTypes":{"abc":"Abc","string":"Str"}}}
// Message: Invalid JSDoc @param "foo" type "abc"; prefer: "Abc".

/**
* @param {Array} foo
*/
Expand Down
6 changes: 0 additions & 6 deletions docs/rules/match-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,6 @@ const q = class {
// "jsdoc/match-description": ["error"|"warn", {"contexts":["any"]}]
// Message: JSDoc description does not satisfy the regex pattern.

/**
* foo.
*/
// "jsdoc/match-description": ["error"|"warn", {"contexts":["any"]}]
// Message: JSDoc description does not satisfy the regex pattern.

/**
* foo.
*/
Expand Down
9 changes: 0 additions & 9 deletions docs/rules/no-undefined-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,6 @@ const MyType = require('my-library').MyType;

}

const MyType = require('my-library').MyType;

/**
* @param {MyType} foo - Bar.
*/
function quux(foo) {

}

import {MyType} from 'my-library';

/**
Expand Down
18 changes: 0 additions & 18 deletions docs/rules/require-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,6 @@ class quux {
// "jsdoc/require-description": ["error"|"warn", {"contexts":["any"],"descriptionStyle":"tag"}]
// Message: Missing JSDoc @description declaration.

/**
*
*/
class quux {

}
// "jsdoc/require-description": ["error"|"warn", {"contexts":["ClassDeclaration"],"descriptionStyle":"tag"}]
// Message: Missing JSDoc @description declaration.

/**
*
*/
class quux {

}
// "jsdoc/require-description": ["error"|"warn", {"contexts":["ClassDeclaration"],"descriptionStyle":"tag"}]
// Message: Missing JSDoc @description declaration.

/**
* @description
*/
Expand Down
11 changes: 0 additions & 11 deletions docs/rules/require-jsdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,6 @@ export function someMethod() {
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":{"cjs":false,"esm":true,"window":false},"require":{"FunctionDeclaration":true}}]
// Message: Missing JSDoc comment.

export function someMethod() {

}
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":{"cjs":false,"esm":true,"window":false},"require":{"FunctionDeclaration":true}}]
// Message: Missing JSDoc comment.

const myObject = {
myProp: true
};
Expand Down Expand Up @@ -1566,11 +1560,6 @@ export function someMethod() {
}
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":{"cjs":true,"esm":false,"window":false},"require":{"FunctionDeclaration":true}}]

export function someMethod() {

}
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":{"cjs":true,"esm":false,"window":false},"require":{"FunctionDeclaration":true}}]

exports.someMethod = function() {

}
Expand Down
50 changes: 0 additions & 50 deletions docs/rules/require-param.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,14 +627,6 @@ function quux (foo) {
// Settings: {"jsdoc":{"tagNamePreference":{"param":"arg"}}}
// Message: Missing JSDoc @arg "foo" declaration.

/**
* @param foo
*/
function quux (foo, bar) {

}
// Message: Missing JSDoc @param "bar" declaration.

/**
* @override
*/
Expand Down Expand Up @@ -1351,22 +1343,6 @@ function quux (foo) {

}

/**
* @augments
*/
function quux (foo) {

}
// Settings: {"jsdoc":{"augmentsExtendsReplacesDocs":true}}

/**
* @extends
*/
function quux (foo) {

}
// Settings: {"jsdoc":{"augmentsExtendsReplacesDocs":true}}

/**
* @override
*/
Expand Down Expand Up @@ -1480,32 +1456,6 @@ class A {
}
}

/**
* @augments
*/
class A {
/**
*
*/
quux (foo) {

}
}
// Settings: {"jsdoc":{"augmentsExtendsReplacesDocs":true}}

/**
* @extends
*/
class A {
/**
*
*/
quux (foo) {

}
}
// Settings: {"jsdoc":{"augmentsExtendsReplacesDocs":true}}

/**
* @internal
*/
Expand Down
57 changes: 0 additions & 57 deletions docs/rules/require-returns-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,20 +368,6 @@ function foo() {
};
// Message: JSDoc @returns declaration present but return expression not available in function.

/**
* @returns {SomeType} Baz.
*/
function foo() {
switch (true) {
default:
switch (false) {
default: return;
}
return "baz";
}
};
// Message: JSDoc @returns declaration present but return expression not available in function.

/**
* @returns {number}
*/
Expand Down Expand Up @@ -422,14 +408,6 @@ function quux () {
return foo;
}

/**
* @returns {string} Foo.
*/
function quux () {

return foo;
}

/**
*
*/
Expand Down Expand Up @@ -580,17 +558,6 @@ function quux () {
return true;
}

/**
* @returns {true}
*/
function quux () {
try {
return true;
} catch (err) {
}
return true;
}

/**
* @returns {true}
*/
Expand All @@ -614,17 +581,6 @@ function quux () {
return true;
}

/**
* @returns {true}
*/
function quux () {
switch (true) {
case 'abc':
return true;
}
return true;
}

/**
* @returns {true}
*/
Expand Down Expand Up @@ -1016,19 +972,6 @@ function foo() {
}
};

/**
* @returns Baz.
*/
function foo() {
switch (true) {
default:
switch (false) {
default: return;
}
return "baz";
}
};

/**
* @returns
*/
Expand Down
13 changes: 0 additions & 13 deletions docs/rules/require-returns.md
Original file line number Diff line number Diff line change
Expand Up @@ -864,12 +864,6 @@ const quux = () => {

}

/**
*
*/
function quux () {
}

/**
*
*/
Expand Down Expand Up @@ -924,13 +918,6 @@ function quux () {
return;
}

/**
* @returns {void}
*/
function quux () {
}
// "jsdoc/require-returns": ["error"|"warn", {"forceRequireReturn":true}]

/**
* @returns {void}
*/
Expand Down
8 changes: 0 additions & 8 deletions docs/rules/require-yields-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,6 @@ function * quux () {
yield foo;
}

/**
* @yields {string} Foo.
*/
function * quux () {

yield foo;
}

/**
*
*/
Expand Down
23 changes: 0 additions & 23 deletions docs/rules/require-yields.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,6 @@ function * quux () {
}
// Message: Missing JSDoc @yields declaration.

/**
*
*/
function * quux () {
if (true) {
yield;
}
yield true;
}
// Message: Missing JSDoc @yields declaration.

/**
*
*/
Expand Down Expand Up @@ -586,12 +575,6 @@ function * quux (foo) {
yield foo;
}

/**
* @constructor
*/
function * quux (foo) {
}

/**
* @yields {object}
*/
Expand All @@ -612,12 +595,6 @@ function * quux () {
function * quux () {
}

/**
*
*/
function * quux () {
}

/**
* @yields {void}
*/
Expand Down
Loading

0 comments on commit e343ab5

Please sign in to comment.