Skip to content

Commit

Permalink
Add jsdoc linter plugin + rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuddi committed May 22, 2024
1 parent 4e40c8c commit 421c2ef
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'jsdoc'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
parserOptions: {
project: './tsconfig.base.json',
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'jsdoc/check-access': 1, // Recommended
'jsdoc/check-alignment': 1, // Recommended
'jsdoc/check-indentation': 1,
'jsdoc/check-line-alignment': 1,
'jsdoc/check-param-names': 1, // Recommended
'jsdoc/check-property-names': 1, // Recommended
'jsdoc/check-syntax': 1,
'jsdoc/check-types': 1, // Recommended
'jsdoc/check-values': 1, // Recommended
'jsdoc/empty-tags': 1, // Recommended
'jsdoc/implements-on-classes': 1, // Recommended
'jsdoc/informative-docs': 1,
'jsdoc/match-description': 1,
'jsdoc/multiline-blocks': 1, // Recommended
'jsdoc/no-bad-blocks': 1,
'jsdoc/no-blank-block-descriptions': 1,
'jsdoc/no-defaults': 1,
'jsdoc/no-multi-asterisks': 1, // Recommended
'jsdoc/no-types': 1,
'jsdoc/no-undefined-types': 1, // Recommended
'jsdoc/require-asterisk-prefix': 1,
'jsdoc/require-description': 1,
'jsdoc/require-description-complete-sentence': 1,
'jsdoc/require-hyphen-before-param-description': 1,
'jsdoc/require-jsdoc': 1, // Recommended
'jsdoc/require-param': 1, // Recommended
'jsdoc/require-param-description': 1, // Recommended
'jsdoc/require-param-name': 1, // Recommended
'jsdoc/require-property': 1, // Recommended
'jsdoc/require-property-description': 1, // Recommended
'jsdoc/require-property-name': 1, // Recommended
'jsdoc/require-property-type': 1, // Recommended
'jsdoc/require-returns': 1, // Recommended
'jsdoc/require-returns-check': 1, // Recommended
'jsdoc/require-returns-description': 1, // Recommended
'jsdoc/require-throws': 1,
'jsdoc/require-yields': 1, // Recommended
'jsdoc/require-yields-check': 1, // Recommended
'jsdoc/valid-types': 1, // Recommended
},
};
103 changes: 103 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^48.2.5",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"mocha": "10.0.0",
Expand Down

0 comments on commit 421c2ef

Please sign in to comment.