Skip to content

Commit 04f2d9d

Browse files
fix: jsdoc rules for js and ts
1 parent cf980df commit 04f2d9d

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

src/plugins/jsdoc.ts

+18-24
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
1+
import { typescriptFiles } from "common/files";
12
import type { Linter } from "eslint";
23

34
export const settings: Linter.Config = {
45
plugins: ["jsdoc"],
56

7+
extends: ["plugin:jsdoc/recommended"],
8+
69
rules: {
7-
"jsdoc/check-access": "warn",
8-
"jsdoc/check-alignment": "warn",
910
// waiting on https://github.com/eslint/eslint/issues/14745
1011
// "jsdoc/check-examples": "warn",
1112
"jsdoc/check-indentation": "warn",
1213
"jsdoc/check-line-alignment": "warn",
13-
"jsdoc/check-param-names": "warn",
14-
"jsdoc/check-property-names": "warn",
15-
"jsdoc/check-tag-names": "warn",
16-
"jsdoc/check-types": "warn",
17-
"jsdoc/check-values": "warn",
18-
"jsdoc/empty-tags": "warn",
19-
"jsdoc/implements-on-classes": "warn",
20-
"jsdoc/multiline-blocks": "warn",
21-
"jsdoc/newline-after-description": "warn",
2214
"jsdoc/no-bad-blocks": "warn",
2315
"jsdoc/no-defaults": "warn",
24-
"jsdoc/no-multi-asterisks": "warn",
25-
// For TypeScript
26-
"jsdoc/no-types": "warn",
27-
"jsdoc/no-undefined-types": "warn",
2816
"jsdoc/require-asterisk-prefix": "warn",
2917
"jsdoc/require-description": "warn",
3018
// Rule is too strict.
@@ -47,20 +35,26 @@ export const settings: Linter.Config = {
4735
},
4836
},
4937
],
50-
"jsdoc/require-param-description": "warn",
51-
"jsdoc/require-param-name": "warn",
52-
"jsdoc/require-property-description": "warn",
53-
"jsdoc/require-property-name": "warn",
54-
"jsdoc/require-returns-check": "warn",
55-
"jsdoc/require-returns-description": "warn",
5638
"jsdoc/require-throws": "warn",
57-
"jsdoc/require-yields": "warn",
58-
"jsdoc/require-yields-check": "warn",
5939
"jsdoc/tag-lines": [
6040
"warn",
6141
"never",
6242
{ noEndLines: true, tags: { example: { lines: "always" } } },
6343
],
64-
"jsdoc/valid-types": "warn",
6544
},
45+
46+
overrides: [
47+
{
48+
files: typescriptFiles,
49+
rules: {
50+
"jsdoc/no-types": "warn",
51+
"jsdoc/require-param-type": "off",
52+
"jsdoc/require-param": "off",
53+
"jsdoc/require-property-type": "off",
54+
"jsdoc/require-property": "off",
55+
"jsdoc/require-returns-type": "off",
56+
"jsdoc/require-returns": "off",
57+
},
58+
},
59+
],
6660
};

0 commit comments

Comments
 (0)