Skip to content

Commit

Permalink
feat(eslint-plugin): enforce multiline JSDoc description indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkdev98 committed Apr 10, 2023
1 parent fe54248 commit 5c108ab
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/benchmarking/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @typedef {object} BenchRunner
* @property {number} N Amount of iterations this call should do
* @property {() => void} resetTime Reset the start time. Should be used if some setup is
* necessary, but shouldn't be counted to wards the time spent.
* necessary, but shouldn't be counted to wards the time spent.
*/

/**
Expand Down
16 changes: 8 additions & 8 deletions packages/code-gen/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import { lowerCaseFirst } from "./utils.js";
/**
* @typedef {object} GenerateOpts
* @property {string[]|undefined} [enabledGroups] Enabling specific groups so different
* generator combinations can be used. The machinery will automatically find
* referenced types and include those If this is undefined, all groups will be
* enabled.
* generator combinations can be used. The machinery will automatically find
* referenced types and include those If this is undefined, all groups will be
* enabled.
* @property {boolean|undefined} [isBrowser]
* @property {boolean|undefined} [isNode]
* @property {boolean|undefined} [isNodeServer]
Expand All @@ -47,16 +47,16 @@ import { lowerCaseFirst } from "./utils.js";
* "reactQuery"
* )[]|undefined} [enabledGenerators] Enabling specific generators.
* @property {boolean|undefined} [useTypescript] Enable Typescript for the generators
* that support it
* that support it
* @property {boolean|undefined} [dumpStructure] Dump a structure.js file with the used
* structure in it.
* structure in it.
* @property {boolean|undefined} [dumpApiStructure] An api only variant of
* 'dumpStructure'. Includes all referenced types by defined 'route' types.
* 'dumpStructure'. Includes all referenced types by defined 'route' types.
* @property {boolean|undefined} [dumpPostgres] Dump a structure.sql based on all
* 'enableQueries' object types.
* 'enableQueries' object types.
* @property {string|undefined} [fileHeader] Custom file header.
* @property {string} outputDirectory Directory to write files to. Note that this is
* recursively cleaned before writing the new files.
* recursively cleaned before writing the new files.
* @property {false|undefined} [declareGlobalTypes]
*/

Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ module.exports = {
// ESLint plugin jsdoc
"jsdoc/check-alignment": "error",
"jsdoc/check-examples": "off",
"jsdoc/check-indentation": "off",
"jsdoc/check-line-alignment": ["error", "never", { wrapIndent: " " }],
"jsdoc/check-param-names": "error",
"jsdoc/check-property-names": "error",
"jsdoc/check-syntax": "error",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
* headers.
* @property {boolean|undefined} [disableHealthRoute] Disable GET /_health
* @property {ErrorHandlerOptions|undefined} [errorOptions] Flexible error handling
* options
* options
* @property {HeaderOptions|undefined} [headers] Argument for defaultHeader middleware.
* Can only be completely disabled by setting `disableHeaders`.
* @property {import("./middleware/log.js").LogOptions|undefined} [logOptions] Pass
Expand Down Expand Up @@ -48,12 +48,12 @@ import {
/**
* @typedef {object} CorsOptions
* @property {string|((ctx: Koa.Context) => (string|undefined))} [origin]
* 'Access-Control-Allow-Origin', defaults to the 'Origin' header.
* 'Access-Control-Allow-Origin', defaults to the 'Origin' header.
* @property {string|string[]|undefined} [exposeHeaders] 'Access-Control-Expose-Headers'
* @property {string|number|undefined} [maxAge] 'Access-Control-Max-Age' in seconds
* @property {boolean|undefined} [credentials] 'Access-Control-Allow-Credentials'
* @property {string|string[]|undefined} [allowMethods] 'Access-Control-Allow-Methods',
* defaults to ["DELETE", "GET", "PUT", "POST", "PATCH", "HEAD", "OPTIONS"]
* defaults to ["DELETE", "GET", "PUT", "POST", "PATCH", "HEAD", "OPTIONS"]
* @property {string|string[]|undefined} [allowHeaders] 'Access-Control-Allow-Headers'
*/

Expand Down
14 changes: 7 additions & 7 deletions packages/store/src/queue-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ import { query } from "./query.js";
* specific handler is provided, the handlerTimeout value is used. The timeout should
* be in milliseconds.
* @property {number} [pollInterval] Determine the poll interval in
* milliseconds if the queue did not have available jobs. Defaults to 1500 ms.
* milliseconds if the queue did not have available jobs. Defaults to 1500 ms.
* @property {number} [parallelCount] Set the amount of parallel jobs to
* process. Defaults to 1. Make sure it is not higher than the number of Postgres
* connections in the pool. Note that if you set a higher number than 1 that some jobs
* process. Defaults to 1. Make sure it is not higher than the number of Postgres
* connections in the pool. Note that if you set a higher number than 1 that some jobs
* may run in parallel, so make sure your code expects that.
* @property {number} [maxRetryCount] The worker will automatically catch any
* errors thrown by the handler, and retry the job at a later stage. This property
* defines the max number of retries before forcing the job to be completed. Defaults
* to 2 retries.
* errors thrown by the handler, and retry the job at a later stage. This property
* defines the max number of retries before forcing the job to be completed. Defaults
* to 2 retries.
* @property {number} [handlerTimeout] Maximum time the handler could take to
* fulfill a job in milliseconds. Defaults to 30 seconds.
* fulfill a job in milliseconds. Defaults to 30 seconds.
* @property {string[]} [includedNames] Included job names for this job worker,
* ignores all other jobs.
* @property {string[]} [excludedNames] Excluded job names for this job worker,
Expand Down
4 changes: 2 additions & 2 deletions scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ mainFn(import.meta, main);

/**
* @typedef {object} ChangelogCommit
* @property {string} title Full commit title
* @property {string} title Full commit title
* @property {string} hash The full commit hash
* @property {string} body Full commit body
* @property {string|undefined} [breakingChange] Commit body breaking change or major
* bumps
* bumps
* @property {string[]} notes Changelog notes
*/

Expand Down

0 comments on commit 5c108ab

Please sign in to comment.