Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
style: jsdoc comments must be complete sentences
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Dec 18, 2023
1 parent f58e96a commit ea517f8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports = {
"@eslint-community/eslint-comments/require-description": "error",
"import/no-extraneous-dependencies": "error",
"jsdoc/check-syntax": "error",
"jsdoc/require-description-complete-sentence": "error",
"jsdoc/require-hyphen-before-param-description": "error",
"no-multiple-empty-lines": ["error", { max: 1 }],
"prefer-destructuring": ["error", { object: true, array: false }],
Expand Down
2 changes: 1 addition & 1 deletion scripts/license-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function checkLicenses() {
console.log("Checking licenses of direct production dependencies...");

/**
* List of deprecated copyleft license identifiers
* List of deprecated copyleft license identifiers.
* @see {@link https://spdx.org/licenses/#deprecated | SPDX Deprecated License Identifiers}
*/
const deprecatedLicenseList = [
Expand Down
2 changes: 1 addition & 1 deletion src/routes/redirect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function route(server, options) {
/**
* Unable to use WHATWG URL API here to serialise URL,
* as the API treats hashes in shebangs as the start
* of a fragment
* of a fragment.
*/
const espUrl = options.redirectUrl + fastStringify(req.query);
server.log.debug(espUrl);
Expand Down
6 changes: 3 additions & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async function plugin(server, config) {
/**
* Encapsulate the docs routes into a child context, so that the
* CSP can be relaxed, and cache enabled, without affecting
* security of other routes
* security of other routes.
*/
.register(async (publicContext) => {
const relaxedHelmetConfig = structuredClone(config.helmet);
Expand Down Expand Up @@ -173,13 +173,13 @@ async function plugin(server, config) {
/**
* Catch 5xx errors, log them, and return a generic 500
* response. This avoids leaking internal server error details
* to the client
* to the client.
*/
if (
(err.statusCode >= 500 && err.statusCode !== 503) ||
/**
* Uncaught errors will have a res.statusCode but not
* an err.statusCode as @fastify/sensible sets that
* an err.statusCode as @fastify/sensible sets that.
*/
(res.statusCode === 200 && !err.statusCode)
) {
Expand Down
2 changes: 1 addition & 1 deletion src/server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ describe("Server deployment", () => {
});
});

/** @todo fix this impacting the API documentation `describe` block, and move it back to running before it */
/** @todo Fix this impacting the API documentation `describe` block, and move it back to running before it. */
describe("Query string API key auth enabled", () => {
let config;
/** @type {Fastify.FastifyInstance} */
Expand Down

0 comments on commit ea517f8

Please sign in to comment.