Skip to content

Commit

Permalink
chore: enable eslint-plugin-jsdoc (#400)
Browse files Browse the repository at this point in the history
Co-authored-by: Shinigami <[email protected]>
  • Loading branch information
pkuczynski and Shinigami92 authored Feb 5, 2022
1 parent 271c400 commit 832bf8a
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 57 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,27 @@ module.exports = defineConfig({
'@typescript-eslint/unbound-method': 'warn',
},
overrides: [
{
files: ['src/**/*.ts'],
plugins: ['jsdoc'],
extends: ['plugin:jsdoc/recommended'],
rules: {
'jsdoc/no-types': 'error',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/tag-lines': 'off',

// Rule will come in one of the next releases: https://github.com/gajus/eslint-plugin-jsdoc/pull/833
// We want to explicitly set this rule to error in the future
// 'jsdoc/sort-tags': 'warn',
},
settings: {
jsdoc: {
mode: 'typescript',
},
},
},
{
files: ['test/*.spec.ts'],
rules: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
]
},
"devDependencies": {
"@types/node": "~16.11.21",
"@types/node": "~16.11.22",
"@typescript-eslint/eslint-plugin": "~5.10.2",
"@typescript-eslint/parser": "~5.10.2",
"@types/prettier": "~2.4.3",
Expand All @@ -99,6 +99,7 @@
"esbuild": "~0.14.18",
"eslint-define-config": "~1.2.3",
"eslint-gitignore": "~0.1.0",
"eslint-plugin-jsdoc": "~37.7.1",
"eslint": "~8.8.0",
"esno": "~0.14.0",
"lint-staged": "~12.3.3",
Expand Down
Loading

0 comments on commit 832bf8a

Please sign in to comment.