forked from allegro/turnilo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.json
95 lines (93 loc) · 4.41 KB
/
tslint.json
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
{
"extends": [
"tslint:recommended",
"tslint-eslint-rules",
"tslint-react",
"tslint-no-focused-test"
],
"rules": {
"arrow-parens": [true, // disallow parens around single argument arrow functions
"ban-single-arg-parens"
],
"ban": [true,
["_", "extend"],
["_", "isNull"],
["_", "isDefined"]
],
"curly": [true,
"ignore-same-line" // don't enforce braces in single line conditionals
],
"file-header": [
true,
"Copyright \\d{4}-\\d{4} Allegro.pl"
],
"no-focused-test": true,
"indent": [true, "spaces", 2],
"interface-name": [true, "never-prefix"], // don't allow prefixing interface names with "I"
"jsdoc-format": [true, "check-multiline-start"], // don't allow text after "/**" in first line
"max-line-length": [true, 200],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"member-access": false, // don't require explicit member access declaration
"member-ordering": [true,
"static-before-instance"
],
"no-console": [true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-inferrable-types": true, // enforce const x = 1 instead of const x: number = 1
"no-require-imports": false, // allow require() style imports
"no-string-literal": false, // allow opj["property"] syntax
"no-var-requires": false, // allow assignment of required modules
"object-literal-sort-keys": false, // allow unordered keys in object literals
"ordered-imports": true,
"quotemark": [true, // enforce double quotes, single only to avoid escapes, disallow unnecessary templates
"double",
"jsx-double",
"avoid-escape",
"avoid-template"
],
"trailing-comma": [true, // disallow a trailing comma after last element of list like constructs
{
"singleline": "never",
"multiline": "never"
}
],
// tslint-eslint-rules
"array-bracket-spacing": [true, // disallow spaces after opening and before closing array brackets
"never"
],
"object-curly-spacing": [true, // enforce spaces in curly braces in objects literals, imports and destructuring
"always"
],
// TODO: fix those rules manually at some point
"ban-types": false, // ban general Function type and uppercase simple types (String, Number, Boolean, ...)
"forin": false, // enforces iteration on own properties only
"jsx-alignment": false, // enforces consistent multiline elements alignment
"jsx-key": false, // enforce key properties on elements in lists (reconciliation performance)
"jsx-no-bind": false, // disallow function binding in props (binding creates new function value and forces rerender of component)
"jsx-no-lambda": false, // disallow lambda in props (creates new function value and forces rerender of component)
"jsx-no-multiline-js": false, // disallow multiline js in jsx (reduces readability)
"jsx-no-string-ref": false, // passing string refs is discouraged in React now
"jsx-self-close": false, // enforce self closing of empty jsx elements
"jsx-wrap-multiline": false, // enforce wrapping of multiline jsx elements in parens (React's de facto standard)
"jsx-space-before-trailing-slash": false, // enforce space before "/>" in empty jsx elements
"max-classes-per-file": false, // disallow multiple classes in a single file
"no-angle-bracket-type-assertion": false, // enforce consistent "as X" type assertion style, "<X>" style is not compatible with TSX
"no-any": false, // disallow declarations of "any" type
"no-conditional-assignment": false, // disallow assignment in conditional condition statements
"no-duplicate-variable": false, // disallow duplicate variable declaration in the same block, not needed after we get rid of vars
"no-empty": false, // disallow empty function / method bodies
"no-empty-interface": false, // disallow empty named interfaces, replace with {}
"no-shadowed-variable": false, // disallow variable shadowing
"no-unused-expression": false, // disallow unused expressions, currently many "to.be.true" expectations trigger it
"no-unused-variable": false, // disallow unused variables
"no-var-keyword": false,
"only-arrow-functions": false, // disallow anonymous functions (function() { })
"prefer-const": false, // prefer consts where possible instead of lets
"variable-name": false // enforce consistent variable naming
}
}