1// Rules that don't require type information, Lint category. 2// Enable non-strict mode to allow comments. 3{ 4 "rules": { 5 "array-type": [true, "array-simple"], 6 "arrow-return-shorthand": true, 7 "ban": [true, 8 ["fit"], 9 ["fpit"], 10 ["fdescribe"], 11 ["fpdescribe"], 12 ["xit"], 13 ["xpit"], 14 ["xdescribe"], 15 ["xpdescribe"], 16 ["fitAsync"], 17 ["xitAsync"], 18 ["fitFakeAsync"], 19 ["xitFakeAsync"], 20 {"name": ["it", "skip"]}, 21 {"name": ["it", "only"]}, 22 {"name": ["it", "async", "skip"]}, 23 {"name": ["it", "async", "only"]}, 24 {"name": ["pit", "skip"]}, 25 {"name": ["pit", "only"]}, 26 {"name": ["pit", "async", "skip"]}, 27 {"name": ["pit", "async", "only"]}, 28 {"name": ["describe", "skip"]}, 29 {"name": ["describe", "only"]}, 30 {"name": ["pdescribe", "skip"]}, 31 {"name": ["pdescribe", "only"]}, 32 {"name": ["describeWithDate", "skip"]}, 33 {"name": ["describeWithDate", "only"]}, 34 {"name": ["describeBooleanFlag", "only"]}, 35 {"name": ["describeEnabledBooleanFlag", "only"]}, 36 {"name": "parseInt", "message": "See http://go/tsstyle#type-coercion"}, 37 {"name": "parseFloat", "message": "See http://go/tsstyle#type-coercion"}, 38 {"name": "Array", "message": "See http://go/tsstyle#array-constructor"}, 39 {"name": ["*", "innerText"], "message": "Use .textContent instead. http://go/typescript/patterns#browser-oddities"}, 40 {"name": ["goog", "setTestOnly"], "message": "See http://go/tsstyle#tests"} 41 ], 42 "ban-types": [true, 43 ["Object", "Use {} or 'object' instead. See http://go/ts-style#wrapper-types"], 44 ["String", "Use 'string' instead."], 45 ["Number", "Use 'number' instead."], 46 ["Boolean", "Use 'boolean' instead."], 47 // Add tests in google3/javascript/typescript/tslint/test/googleConfig/ban_types.ts.lint 48 ["AnyDuring(?!((CelloJs|AngularIvy|Drive|1TF|AllAsUnknown|GoogPromiseThen|Search|DWE|Assisted)Migration)).*", 49 "AnyDuringMigration is a quick-fix used during TypeScript migrations, and should be removed as soon as possible. See http://go/any_during_migration."] 50 ], 51 // go/keep-sorted start 52 "class-name": true, 53 "curly": [true, "ignore-same-line"], 54 "forin": true, 55 "interface-name": [true, "never-prefix"], 56 "interface-over-type-literal": true, 57 "jsdoc-format": true, 58 "label-position": true, 59 "member-access": [true, "no-public"], 60 "new-parens": true, 61 "no-angle-bracket-type-assertion": true, 62 "no-conditional-assignment": [true, "allow-within-parenthesis"], 63 "no-construct": true, 64 "no-debugger": true, 65 "no-default-export": true, 66 "no-duplicate-switch-case": true, 67 "no-namespace": [true, "allow-declarations"], 68 "no-reference": true, 69 "no-require-imports": true, 70 "no-string-throw": true, 71 "no-unsafe-finally": true, 72 "no-unused-expression": [true, "allow-fast-null-checks"], 73 "no-var-keyword": true, 74 "object-literal-shorthand": true, 75 "one-variable-per-declaration": [true, "ignore-for-loop"], 76 "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], 77 "prefer-const": [true, {"destructuring": "all"}], 78 "radix": true, 79 "semicolon": [true, "always", "strict-bound-class-methods"], 80 "static-this": true, 81 "switch-default": true, 82 "triple-equals": [true, "allow-null-check"], 83 "unnecessary-constructor": true 84 // go/keep-sorted end 85 } 86}