refactor: Enable jsdoc/no-types rule

This commit is contained in:
Joachim Van Herwegen 2024-03-13 16:14:59 +01:00
parent 45640a36d6
commit 5fc4ce8f73
2 changed files with 2 additions and 2 deletions

View File

@ -52,6 +52,7 @@ module.exports = {
'import/no-extraneous-dependencies': 'error',
'jsdoc/no-multi-asterisks': [ 'error', { allowWhitespace: true }],
'jsdoc/no-types': 'error',
'node/prefer-global/buffer': [ 'error', 'always' ],
'node/prefer-global/console': [ 'error', 'always' ],

View File

@ -134,7 +134,6 @@ export function parseParameters(parameters: string[], replacements: Record<strin
return parsed;
}
// eslint-disable-next-line jsdoc/require-returns-check
/**
* Parses a single media range with corresponding parameters from an Accept header.
* For every parameter value that is a double quoted string,
@ -146,7 +145,7 @@ export function parseParameters(parameters: string[], replacements: Record<strin
* @param replacements - The double quoted strings that need to be replaced.
* @param strict - Determines if invalid values throw errors (`true`) or log warnings (`false`). Defaults to `false`.
*
* @returns {@link Accept | undefined} object corresponding to the header string, or
* @returns An object corresponding to the header string, or
* undefined if an invalid type or sub-type is detected.
*/
function parseAcceptPart(part: string, replacements: Record<string, string>, strict: boolean): Accept | undefined {