-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsdoc.js
58 lines (57 loc) · 1.4 KB
/
jsdoc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// @ts-check
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: [
// https://github.com/gajus/eslint-plugin-jsdoc/blob/main/src/index.js
'plugin:jsdoc/recommended',
],
plugins: ['jsdoc'],
settings: {
// https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md
jsdoc: {
mode: 'typescript',
},
},
rules: {
/**
* eslint-plugin-jsdoc (override on top of 'jsdoc/recommended').
*
* @see
* https://github.com/gajus/eslint-plugin-jsdoc
*/
'jsdoc/tag-lines': [1, 'any', { startLines: 1, endLines: 0 }],
'jsdoc/require-jsdoc': [
1,
{ publicOnly: true, exemptEmptyFunctions: true },
],
// Add rules that are not present or `off` in `jsdoc/recommended`
'jsdoc/check-line-alignment': [
1,
'always',
{
preserveMainDescriptionPostDelimiter: true,
tags: [
'param',
'arg',
'argument',
'property',
'prop',
// Disabling these as it doesn't look good
// 'returns',
// 'return',
],
},
],
'jsdoc/check-syntax': 1,
'jsdoc/no-bad-blocks': 1,
},
overrides: [
{
files: ['*.{ts,mts,tsx}'],
extends: [
// https://github.com/gajus/eslint-plugin-jsdoc/blob/main/src/index.js
'plugin:jsdoc/recommended-typescript',
],
},
],
};