-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
92 lines (88 loc) · 4.06 KB
/
.eslintrc.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
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
// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
module.exports = {
extends: '@dolittle',
rules: {
'@typescript-eslint/unified-signatures': 'off',
'import/no-extraneous-dependencies': 'off',
'eol-last': 'error',
'no-multiple-empty-lines': ['error', {'max': 1, 'maxEOF': 0 }],
'header/header': [
2,
'line',
[
' Copyright (c) Dolittle. All rights reserved.',
' Licensed under the MIT license. See LICENSE file in the project root for full license information.',
],
2
],
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/valid-types': 'error',
'jsdoc/require-hyphen-before-param-description': 'error',
'jsdoc/check-line-alignment': 'error',
'jsdoc/require-returns-check': 'error',
'jsdoc/require-returns-description': 'error',
'jsdoc/require-returns-type': 'error',
'jsdoc/check-tag-names': 'error',
'jsdoc/check-param-names': 'error',
'jsdoc/check-types': 'error',
'jsdoc/empty-tags': 'error',
'jsdoc/no-bad-blocks': 'error',
'jsdoc/no-undefined-types': 'error',
'jsdoc/multiline-blocks': 'error',
'jsdoc/no-multi-asterisks': 'error',
'jsdoc/require-asterisk-prefix': 'error',
'jsdoc/require-description-complete-sentence': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-description': 'error',
'jsdoc/tag-lines': ['error', 'always', { 'count': 0 }],
'jsdoc/require-jsdoc': ['error', {
'require': {
'FunctionDeclaration': false
},
'contexts': [
'ExportNamedDeclaration>TSTypeAliasDeclaration',
'ExportNamedDeclaration>TSInterfaceDeclaration',
'ExportNamedDeclaration>ClassDeclaration',
'ExportNamedDeclaration[declaration.type="TSDeclareFunction"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="TSDeclareFunction"])',
'ExportNamedDeclaration[declaration.type="FunctionDeclaration"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="FunctionDeclaration"])',
'MethodDefinition[accessibility!="private"][value.type="TSEmptyBodyFunctionExpression"]:not(MethodDefinition[value.type="TSEmptyBodyFunctionExpression"] + MethodDefinition[value.type="TSEmptyBodyFunctionExpression"])',
'MethodDefinition[accessibility!="private"][value.type="FunctionExpression"]:not(MethodDefinition[value.type="TSEmptyBodyFunctionExpression"] + MethodDefinition[value.type="FunctionExpression"])',
]
}],
'jsdoc/require-returns': ['error', {
'contexts': [
'ArrowFunctionExpression',
'FunctionDeclaration',
'MethodDefinition[kind!="get"]'
]
}],
'jsdoc/require-description': ['error', {
'descriptionStyle': 'body',
'contexts': ['any']
}],
// This is nice - but makes the linter horribly slow
// 'jsdoc/match-description': ['error', {
// matchDescription: '^(?:[^\\{]+|\\{@link [^\\}]+\\})+$',
// tags: {
// param: true
// },
// message: 'Descriptions must use {@link ...} for references to other types.'
// }],
},
overrides: [
{
files: ['**/for_*/**'],
rules: {
'@typescript-eslint/naming-convention': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'no-restricted-globals': 'off',
'jsdoc/require-jsdoc': 'off',
},
},
],
};