forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc-jsdoc.js
More file actions
88 lines (86 loc) · 2.14 KB
/
Copy path.eslintrc-jsdoc.js
File metadata and controls
88 lines (86 loc) · 2.14 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* ESLint v10 flat config file for JSDoc linting.
* This config is based on the original valid-jsdoc rules.
*/
const jsdocPlugin = require( 'eslint-plugin-jsdoc' );
module.exports = [
{
plugins: {
jsdoc: jsdocPlugin,
},
settings: {
jsdoc: {
tagNamePreference: {
'arg': 'param',
'argument': 'param',
'extends': 'augments',
'returns': 'return',
},
preferredTypes: {
'array': 'Array',
'bool': 'boolean',
'Boolean': 'boolean',
'float': 'number',
'Float': 'number',
'function': 'Function',
'int': 'number',
'integer': 'number',
'Integer': 'number',
'Number': 'number',
'object': 'Object',
'String': 'string',
'Void': 'void',
},
},
},
rules: {
'jsdoc/check-alignment': 'error',
'jsdoc/check-indentation': [ 'error', {
excludeTags: [
'deprecated',
'example',
'param',
'property',
'return',
'since',
'todo',
],
} ],
'jsdoc/check-line-alignment': [ 'error', 'always', {
tags: [ 'param', 'property' ],
} ],
'jsdoc/check-param-names': 'error',
'jsdoc/check-property-names': 'error',
'jsdoc/check-syntax': 'error',
'jsdoc/check-tag-names': [ 'error', {
definedTags: [
'memberOf',
'output',
'ticket',
'link',
],
} ],
'jsdoc/check-types': 'error',
'jsdoc/no-blank-blocks': 'error',
'jsdoc/no-blank-block-descriptions': 'error',
'jsdoc/require-description': 'error',
'jsdoc/require-hyphen-before-param-description': [ 'error', 'never' ],
'jsdoc/require-jsdoc': 'error',
'jsdoc/require-param': [ 'error', {
enableFixer: false,
} ],
'jsdoc/require-param-description': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-property': 'error',
'jsdoc/require-property-name': 'error',
'jsdoc/require-property-description': 'error',
'jsdoc/require-property-type': 'error',
'jsdoc/require-returns': 'error',
'jsdoc/require-returns-check': 'error',
'jsdoc/require-returns-description': 'error',
'jsdoc/require-returns-type': 'error',
'jsdoc/valid-types': 'error',
},
},
];