refactor: Enable jsdoc/valid-types rule

This commit is contained in:
Joachim Van Herwegen 2024-03-13 16:50:02 +01:00
parent 5fc4ce8f73
commit 3e59aa4b55
3 changed files with 5 additions and 4 deletions

View File

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

View File

@ -177,7 +177,7 @@ export class BaseFileIdentifierMapper implements FileIdentifierMapper {
* Strips the baseRequestURI from the identifier.
* @param identifier - Incoming identifier.
*
* @throws {@link NotFoundHttpError}
* @throws NotFoundHttpError
* If the identifier does not match the baseRequestURI.
*
* @returns A string representing the relative path.
@ -193,7 +193,7 @@ export class BaseFileIdentifierMapper implements FileIdentifierMapper {
/**
* Check if the given relative path is valid.
*
* @throws {@link BadRequestHttpError}
* @throws BadRequestHttpError
* If the relative path is invalid.
*
* @param path - A relative path, as generated by {@link getRelativePath}.

View File

@ -31,7 +31,7 @@ const logger = getLoggerFor('HeaderUtil');
* Replaces all double quoted strings in the input string with `"0"`, `"1"`, etc.
* @param input - The Accept header string.
*
* @throws {@link BadRequestHttpError}
* @throws BadRequestHttpError
* Thrown if invalid characters are detected in a quoted string.
*
* @returns The transformed string and a map with keys `"0"`, etc. and values the original string that was there.
@ -371,7 +371,7 @@ export function addHeader(response: HttpResponse, name: string, value: string |
*
* @param input - The Content-Type header string.
*
* @throws {@link BadRequestHttpError}
* @throws BadRequestHttpError
* Thrown on invalid header syntax.
*
* @returns A {@link ContentType} object containing the value and optional parameters.