Skip to content

Commit 5b58b8f

Browse files
committed
Linter: check JSDoc parameter names exist
1 parent 71d0a56 commit 5b58b8f

20 files changed

+333
-8
lines changed

eslint.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import filenames from "eslint-plugin-filenames";
1212
import github from "eslint-plugin-github";
1313
import _import from "eslint-plugin-import";
1414
import noAsyncForeach from "eslint-plugin-no-async-foreach";
15+
import jsdoc from "eslint-plugin-jsdoc";
1516
import globals from "globals";
1617

1718
const __filename = fileURLToPath(import.meta.url);
@@ -52,6 +53,7 @@ export default [
5253
github: fixupPluginRules(github),
5354
import: fixupPluginRules(_import),
5455
"no-async-foreach": noAsyncForeach,
56+
"jsdoc": jsdoc,
5557
},
5658

5759
languageOptions: {
@@ -133,6 +135,16 @@ export default [
133135
"@typescript-eslint/no-shadow": "error",
134136
"@typescript-eslint/prefer-optional-chain": "error",
135137
"one-var": ["error", "never"],
138+
139+
// Check param names to ensure that we don't have outdated JSDocs.
140+
"jsdoc/check-param-names": [
141+
"error",
142+
{
143+
// We don't currently require full JSDoc coverage, so this rule
144+
// should not error on missing @param annotations.
145+
disableMissingParamChecks: true,
146+
}
147+
],
136148
},
137149
},
138150
{

lib/analyze-action-post.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resolve-environment-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action-post.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)