Deepanjan Roy | f1ba1dc | 2018-06-28 16:51:20 +0100 | [diff] [blame] | 1 | { |
| 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 Tucci | 94c47f0 | 2019-12-05 03:13:11 +0000 | [diff] [blame] | 10 | {"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 Roy | f1ba1dc | 2018-06-28 16:51:20 +0100 | [diff] [blame] | 14 | ], |
| 15 | "ban-types": [true, |
Primiano Tucci | 94c47f0 | 2019-12-05 03:13:11 +0000 | [diff] [blame] | 16 | ["Object", "Use {} or 'object' instead. See http://goto.google.com/ts-style#redundant-types"], |
Deepanjan Roy | f1ba1dc | 2018-06-28 16:51:20 +0100 | [diff] [blame] | 17 | ["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 Schwab | 1430205 | 2018-08-03 17:23:35 -0400 | [diff] [blame] | 43 | "no-unused-expression": [true, "allow-new"], // E.g. new ModifyGlobalState(); without assignment. |
Deepanjan Roy | f1ba1dc | 2018-06-28 16:51:20 +0100 | [diff] [blame] | 44 | "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 Dearman | 44869b1 | 2018-07-09 09:54:31 +0100 | [diff] [blame] | 57 | "allow-trailing-underscore", |
| 58 | "allow-pascal-case" |
Deepanjan Roy | f1ba1dc | 2018-06-28 16:51:20 +0100 | [diff] [blame] | 59 | ], |
| 60 | "deprecation": true, |
| 61 | "no-for-in-array": true, |
| 62 | "no-unnecessary-type-assertion": true, |
Isabelle Taylor | 893438d | 2019-01-29 17:14:29 +0000 | [diff] [blame] | 63 | "restrict-plus-operands": true, |
| 64 | "whitespace": [ |
| 65 | true, |
| 66 | "check-branch", |
| 67 | "check-decl", |
| 68 | "check-operator" |
| 69 | ] |
Nicolò Mazzucato | 607ba93 | 2019-09-05 13:06:30 +0100 | [diff] [blame] | 70 | }, |
| 71 | "jsRules": { |
| 72 | "no-empty": true |
Deepanjan Roy | f1ba1dc | 2018-06-28 16:51:20 +0100 | [diff] [blame] | 73 | } |
Hector Dearman | 44869b1 | 2018-07-09 09:54:31 +0100 | [diff] [blame] | 74 | } |