Skip to content

Commit 9a4ea9b

Browse files
committed
feat: add jsdoc plugin
1 parent fb5848f commit 9a4ea9b

File tree

3 files changed

+80
-3
lines changed

3 files changed

+80
-3
lines changed

packages/eslint-config-basic/index.js

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ module.exports = {
1010
node: true,
1111
},
1212
reportUnusedDisableDirectives: true,
13-
extends: ['./standard', 'plugin:import/recommended', 'plugin:eslint-comments/recommended', 'plugin:jsonc/recommended-with-jsonc', 'plugin:yml/standard', 'plugin:markdown/recommended'],
13+
extends: [
14+
'./standard',
15+
'plugin:import/recommended',
16+
'plugin:eslint-comments/recommended',
17+
'plugin:jsonc/recommended-with-jsonc',
18+
'plugin:yml/standard',
19+
'plugin:markdown/recommended',
20+
'plugin:jsdoc/recommended',
21+
],
1422
ignorePatterns: [
1523
'*.min.*',
1624
'*.d.ts',
@@ -43,7 +51,14 @@ module.exports = {
4351
// force exclude
4452
'**/.vitepress/cache',
4553
],
46-
plugins: ['html', 'unicorn', 'coderwyd', 'no-only-tests', 'unused-imports'],
54+
plugins: [
55+
'html',
56+
'unicorn',
57+
'coderwyd',
58+
'no-only-tests',
59+
'unused-imports',
60+
'jsdoc',
61+
],
4762
settings: {
4863
'import/resolver': {
4964
node: { extensions: ['.js', '.mjs'] },
@@ -400,6 +415,20 @@ module.exports = {
400415
'yml/quotes': ['error', { prefer: 'single', avoidEscape: false }],
401416
'yml/no-empty-document': 'off',
402417

418+
// jsdoc
419+
'jsdoc/require-jsdoc': 'off',
420+
'jsdoc/require-param': 'off',
421+
'jsdoc/require-param-type': 'off',
422+
'jsdoc/require-param-description': 'off',
423+
'jsdoc/require-yields': 'off',
424+
'jsdoc/tag-lines': 'off',
425+
'jsdoc/check-values': 'off',
426+
'jsdoc/check-tag-names': 'off',
427+
'jsdoc/no-undefined-types': 'off',
428+
'jsdoc/require-returns': 'off',
429+
'jsdoc/require-returns-type': 'off',
430+
'jsdoc/require-throws': 'off',
431+
403432
// coderwyd
404433
'coderwyd/no-import-node-modules-by-path': 'error',
405434
'coderwyd/if-newline': 'error',

packages/eslint-config-basic/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"eslint-plugin-eslint-comments": "^3.2.0",
2525
"eslint-plugin-html": "^7.1.0",
2626
"eslint-plugin-import": "npm:eslint-plugin-i@2.28.1",
27+
"eslint-plugin-jsdoc": "^46.8.0",
2728
"eslint-plugin-jsonc": "^2.9.0",
2829
"eslint-plugin-markdown": "^3.0.1",
2930
"eslint-plugin-n": "^16.0.2",

pnpm-lock.yaml

Lines changed: 48 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)