-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.js
78 lines (76 loc) · 1.84 KB
/
tslint.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
const { join, dirname } = require( 'path' );
const commonRules = {
'align': {
'options': ['arguments', 'elements', 'members', 'parameters', 'statements'],
},
'arrow-parens': {
'options': ['ban-single-arg-parens'],
},
'arrow-return-shorthand': {
'options': ['multiline'],
},
'completed-docs': {
'options': ['enums', 'functions', 'methods'],
},
'indent': {
'options': ['tabs', 4],
},
'jsdoc-format': {
'options': ['check-multiline-start'],
},
'linebreak-style': {
'options': ['LF'],
},
'max-line-length': {
'options': [200],
},
'member-ordering': false,
'no-duplicate-variable': {
'options': ['check-parameters'],
},
'no-implicit-dependencies': true,
'no-invalid-template-strings': true,
'no-irregular-whitespace': true,
'no-namespace': false,
'no-return-await': true,
'object-curly-spacing': [true, 'always', { 'objectsInObjects': false }],
'prefer-template': {
'options': ['allow-single-concat'],
},
'quotemark': {
'options': ['single', 'avoid-escape', 'avoid-template'],
},
'space-within-parens': {
'options': [1],
},
'variable-name': {
'options': ['ban-keywords', 'check-format', 'allow-pascal-case', 'allow-leading-underscore'],
},
};
module.exports = {
'defaultSeverity': 'error',
'extends': 'tslint:recommended',
'rulesDirectory': [
join( dirname( require.resolve( 'tslint-eslint-rules' ) ), 'dist/rules' ),
],
'rules': {
...commonRules,
'array-type': {
'options': 'array-simple',
},
'await-promise': true,
'member-access': {
'options': ['check-accessor', 'check-constructor', 'check-parameter-property'],
},
'no-boolean-literal-compare': true,
'no-floating-promises': true,
'no-inferred-empty-object-type': true,
'no-redundant-jsdoc': true,
'no-unnecessary-qualifier': true,
'prefer-readonly': true,
'type-literal-delimiter': true,
},
'jsRules': {
...commonRules,
},
};