From d2a16b99f2b9791734596b974584d5498f2d822f Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Fri, 20 Oct 2023 16:45:27 +0200 Subject: [PATCH] Disable JSDoc requirements that are not upheld anyway --- .eslintrc.yml | 3 +++ lib/sinon/proxy-call.js | 2 ++ lib/sinon/spy-formatters.js | 6 +++++- lib/sinon/util/fake-timers.js | 2 ++ package.json | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 3267eefa9..234dc77df 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -6,3 +6,6 @@ plugins: rules: "@sinonjs/no-prototype-methods/no-prototype-methods": error + "jsdoc/require-param-type": off + "jsdoc/require-jsdoc": off + "jsdoc/tag-lines": off diff --git a/lib/sinon/proxy-call.js b/lib/sinon/proxy-call.js index 84b5af942..631328c2d 100644 --- a/lib/sinon/proxy-call.js +++ b/lib/sinon/proxy-call.js @@ -261,6 +261,8 @@ callProto.invokeCallback = callProto.yield; * @param exception * @param id * @param errorWithCallStack + * + * @returns {object} proxyCall */ function createProxyCall( proxy, diff --git a/lib/sinon/spy-formatters.js b/lib/sinon/spy-formatters.js index 67fb12f47..919771914 100644 --- a/lib/sinon/spy-formatters.js +++ b/lib/sinon/spy-formatters.js @@ -18,6 +18,8 @@ const slice = arrayProto.slice; * @param matcher * @param calledArg * @param calledArgMessage + * + * @returns {string} the colored text */ function colorSinonMatchText(matcher, calledArg, calledArgMessage) { let calledArgumentMessage = calledArgMessage; @@ -32,8 +34,9 @@ function colorSinonMatchText(matcher, calledArg, calledArgMessage) { } /** - * * @param diff + * + * @returns {string} the colored diff */ function colorDiffText(diff) { const objects = map(diff, function (part) { @@ -54,6 +57,7 @@ function colorDiffText(diff) { /** * * @param value + * @returns {string} a quoted string */ function quoteStringValue(value) { if (typeof value === "string") { diff --git a/lib/sinon/util/fake-timers.js b/lib/sinon/util/fake-timers.js index 52c07fdc5..a8cabe27c 100644 --- a/lib/sinon/util/fake-timers.js +++ b/lib/sinon/util/fake-timers.js @@ -8,6 +8,8 @@ const globalObject = require("@sinonjs/commons").global; * * @param config * @param globalCtx + * + * @returns {object} the clock, after installing it on the global context, if given */ function createClock(config, globalCtx) { let FakeTimersCtx = FakeTimers; diff --git a/package.json b/package.json index 3e56f78c1..afe2d2d42 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dev-docs": "cd docs; rsync -r --delete release-source/ releases/dev; npm run serve-docs", "build-docs": "cd docs; bundle exec jekyll build", "serve-docs": "cd docs; bundle exec jekyll serve --incremental --verbose --livereload", - "lint": "eslint --max-warnings 101 '**/*.{js,cjs,mjs}'", + "lint": "eslint --max-warnings 0 '**/*.{js,cjs,mjs}'", "unimported": "unimported .", "pretest-webworker": "npm run build", "prebuild": "rimraf pkg && npm run check-dependencies",