blob: 270eb874e6fd517d1ea00e7cf5a26a4b43f25f0a [file] [log] [blame]
Deepanjan Royf1ba1dc2018-06-28 16:51:20 +01001{
2 "include": [
3 "src/**/*.ts"
4 ],
5 "exclude": [],
6 "rules": {
7 "array-type": [true, "array-simple"],
8 "arrow-return-shorthand": true,
9 "ban": [true,
Primiano Tucci94c47f02019-12-05 03:13:11 +000010 {"name": "parseInt", "message": "See http://goto.google.com/tsstyle#type-coercion"},
11 {"name": "parseFloat", "message": "See http://goto.google.com/tsstyle#type-coercion"},
12 {"name": "Array", "message": "See http://goto.google.com/tsstyle#array-constructor"},
13 {"name": ["*", "innerText"], "message": "Use .textContent instead. http://goto.google.com/typescript/patterns#browser-oddities"}
Deepanjan Royf1ba1dc2018-06-28 16:51:20 +010014 ],
15 "ban-types": [true,
Primiano Tucci94c47f02019-12-05 03:13:11 +000016 ["Object", "Use {} or 'object' instead. See http://goto.google.com/ts-style#redundant-types"],
Deepanjan Royf1ba1dc2018-06-28 16:51:20 +010017 ["String", "Use 'string' instead."],
18 ["Number", "Use 'number' instead."],
19 ["Boolean", "Use 'boolean' instead."]
20 ],
21 "class-name": true,
22 "curly": [true, "ignore-same-line"],
23 "forin": true,
24 "interface-name": [true, "never-prefix"],
25 "interface-over-type-literal": true,
26 "jsdoc-format": true,
27 "label-position": true,
28 "member-access": [true, "no-public"],
29 "new-parens": true,
30 "no-angle-bracket-type-assertion": true,
31 "no-any": true,
32 "no-construct": true,
33 "no-debugger": true,
34 "no-default-export": true,
35 "no-duplicate-switch-case": true,
36 "no-inferrable-types": true,
37 "no-namespace": [true, "allow-declarations"],
38 "no-reference": true,
39 "no-require-imports": true,
40 "no-string-throw": true,
41 "no-return-await": true,
42 "no-unsafe-finally": true,
Michail Schwab14302052018-08-03 17:23:35 -040043 "no-unused-expression": [true, "allow-new"], // E.g. new ModifyGlobalState(); without assignment.
Deepanjan Royf1ba1dc2018-06-28 16:51:20 +010044 "no-var-keyword": true,
45 "object-literal-shorthand": true,
46 "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
47 "prefer-const": true,
48 "radix": true,
49 "semicolon": [true, "always", "ignore-bound-class-methods"],
50 "switch-default": true,
51 "triple-equals": [true, "allow-null-check"],
52 "variable-name": [
53 true,
54 "check-format",
55 "ban-keywords",
56 "allow-leading-underscore",
Hector Dearman44869b12018-07-09 09:54:31 +010057 "allow-trailing-underscore",
58 "allow-pascal-case"
Deepanjan Royf1ba1dc2018-06-28 16:51:20 +010059 ],
60 "deprecation": true,
61 "no-for-in-array": true,
62 "no-unnecessary-type-assertion": true,
Isabelle Taylor893438d2019-01-29 17:14:29 +000063 "restrict-plus-operands": true,
64 "whitespace": [
65 true,
66 "check-branch",
67 "check-decl",
68 "check-operator"
69 ]
Nicolò Mazzucato607ba932019-09-05 13:06:30 +010070 },
71 "jsRules": {
72 "no-empty": true
Deepanjan Royf1ba1dc2018-06-28 16:51:20 +010073 }
Hector Dearman44869b12018-07-09 09:54:31 +010074}