-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
147 lines (147 loc) · 3.95 KB
/
.eslintrc.cjs
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
module.exports = {
root: true,
env: {
browser: false,
es2021: true,
node: true,
jest: true,
},
extends: [
'airbnb-base',
'plugin:prettier/recommended',
'plugin:jsdoc/recommended',
],
plugins: ['prettier', 'jsdoc'],
rules: {
'implicit-arrow-linebreak': 'off',
'function-paren-newline': 'off',
'jsdoc/check-access': 'off',
'jsdoc/check-alignment': 2,
'jsdoc/check-examples': 0,
'jsdoc/check-indentation': 'off',
'jsdoc/check-line-alignment': [2, 'always'],
'jsdoc/check-param-names': [
2,
{ checkRestProperty: true, allowExtraTrailingParamDocs: false },
],
'jsdoc/check-property-names': 2,
'jsdoc/check-syntax': 2,
'jsdoc/check-tag-names': [2, { definedTags: ['category', 'subcategory'] }],
'jsdoc/check-types': 2,
'jsdoc/check-values': 2,
'jsdoc/empty-tags': 2,
'jsdoc/implements-on-classes': 2,
'jsdoc/match-description': 'off',
'jsdoc/match-name': 'off',
'jsdoc/multiline-blocks': [
2,
{
noZeroLineText: true,
noSingleLineBlocks: true,
singleLineTags: ['lends', 'typedef', 'member', 'type'],
noMultilineBlocks: true,
minimumLengthForMultiline: 80,
},
],
'jsdoc/no-bad-blocks': 2,
'jsdoc/no-defaults': 2,
'jsdoc/no-missing-syntax': 'off',
'jsdoc/no-multi-asterisks': [2, { allowWhitespace: true }],
'jsdoc/no-restricted-syntax': 'off',
'jsdoc/no-types': 'off',
'jsdoc/no-undefined-types': 2,
'jsdoc/require-asterisk-prefix': [2, 'always'],
'jsdoc/require-description-complete-sentence': 2,
'jsdoc/require-description': [2, { descriptionStyle: 'tag' }],
'jsdoc/require-example': 'off',
'jsdoc/require-file-overview': [
1,
{
tags: {
author: {
initialCommentsOnly: true,
mustExist: true,
preventDuplicates: false,
},
file: {
initialCommentsOnly: true,
mustExist: true,
preventDuplicates: true,
},
},
},
],
'jsdoc/require-hyphen-before-param-description': [2, 'always'],
'jsdoc/require-jsdoc': [
1,
{
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
FunctionExpression: true,
MethodDefinition: true,
},
},
],
'jsdoc/require-param-description': 2,
'jsdoc/require-param-name': 2,
'jsdoc/require-param-type': 2,
'jsdoc/require-param': [2, { checkRestProperty: true }],
'jsdoc/require-property': 2,
'jsdoc/require-property-description': 2,
'jsdoc/require-property-name': 2,
'jsdoc/require-property-type': 2,
'jsdoc/require-returns-check': 2,
'jsdoc/require-returns-description': 2,
'jsdoc/require-returns-type': 2,
'jsdoc/require-returns': [2, { checkConstructors: true }],
'jsdoc/require-throws': 2,
'jsdoc/require-yields': 2,
'jsdoc/require-yields-check': 2,
'jsdoc/sort-tags': 'off',
'jsdoc/tag-lines': [
2,
'always',
{
count: 1,
startLines: 0,
endLines: 0,
applyToEndTag: false,
tags: {
param: { lines: 'any' },
property: { lines: 'any' },
function: { lines: 'any' },
class: { lines: 'never' },
constructs: { lines: 'never' },
returns: { lines: 'any' },
file: { lines: 'any' },
fires: { lines: 'any' },
},
},
],
'jsdoc/valid-types': 1,
},
ignorePatterns: ['docs', 'node_modules'],
settings: {
'import/resolver': {
alias: [['$src', './src']],
},
jsdoc: {
mode: 'typescript',
tagNamePreference: {
param: 'param',
returns: 'returns',
constructor: 'constructor',
},
},
},
globals: {
node: true,
},
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
},
};