Skip to content

Commit abc2c5f

Browse files
chore: Use eslint-plugin-jsdoc's recommended-typescript-error ruleset (#348)
- [x] Addresses an existing open issue: fixes #303 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview ran ```pnpm install --save-dev eslint-plugin-jsdoc```, added ```"jsdoc"``` to eslint plugins array, and enabled the recommended rules in the eslint config *extends* array with ```"plugin:/jsdoc/recommended"``` --------- Co-authored-by: Josh Goldberg ✨ <[email protected]>
1 parent 54d9f79 commit abc2c5f

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

.eslintrc.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ module.exports = {
1818
},
1919
{
2020
extends: [
21+
"plugin:jsdoc/recommended-typescript-error",
2122
"plugin:@typescript-eslint/recommended",
2223
"plugin:typescript-sort-keys/recommended",
2324
],
2425
files: ["**/*.ts"],
2526
parser: "@typescript-eslint/parser",
27+
rules: {
28+
// These on-by-default rules don't work well for this repo and we like them off.
29+
"jsdoc/require-jsdoc": "off",
30+
"jsdoc/require-param": "off",
31+
"jsdoc/require-property": "off",
32+
"jsdoc/require-returns": "off",
33+
},
2634
},
2735
{
2836
extends: [
@@ -85,6 +93,7 @@ module.exports = {
8593
"@typescript-eslint",
8694
"deprecation",
8795
"import",
96+
"jsdoc",
8897
"no-only-tests",
8998
"regexp",
9099
"simple-import-sort",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"eslint-plugin-deprecation": "^1.3.3",
5151
"eslint-plugin-eslint-comments": "^3.2.0",
5252
"eslint-plugin-import": "^2.27.5",
53+
"eslint-plugin-jsdoc": "^40.1.1",
5354
"eslint-plugin-jsonc": "^2.6.0",
5455
"eslint-plugin-markdown": "^3.0.0",
5556
"eslint-plugin-no-only-tests": "^3.1.0",

pnpm-lock.yaml

Lines changed: 38 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)