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, |
| 10 | {"name": "parseInt", "message": "See http://go/tsstyle#type-coercion"}, |
| 11 | {"name": "parseFloat", "message": "See http://go/tsstyle#type-coercion"}, |
| 12 | {"name": "Array", "message": "See http://go/tsstyle#array-constructor"}, |
| 13 | {"name": ["*", "innerText"], "message": "Use .textContent instead. http://go/typescript/patterns#browser-oddities"} |
| 14 | ], |
| 15 | "ban-types": [true, |
| 16 | ["Object", "Use {} or 'object' instead. See http://go/ts-style#redundant-types"], |
| 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, |
| 63 | "no-unused-variable": true, |
| 64 | "restrict-plus-operands": true |
| 65 | } |
Hector Dearman | 44869b1 | 2018-07-09 09:54:31 +0100 | [diff] [blame] | 66 | } |