| // Rules that don't require type information, Lint category. |
| // Enable non-strict mode to allow comments. |
| { |
| "rules": { |
| "array-type": [true, "array-simple"], |
| "arrow-return-shorthand": true, |
| "ban": [true, |
| ["fit"], |
| ["fpit"], |
| ["fdescribe"], |
| ["fpdescribe"], |
| ["xit"], |
| ["xpit"], |
| ["xdescribe"], |
| ["xpdescribe"], |
| ["fitAsync"], |
| ["xitAsync"], |
| ["fitFakeAsync"], |
| ["xitFakeAsync"], |
| {"name": ["it", "skip"]}, |
| {"name": ["it", "only"]}, |
| {"name": ["it", "async", "skip"]}, |
| {"name": ["it", "async", "only"]}, |
| {"name": ["pit", "skip"]}, |
| {"name": ["pit", "only"]}, |
| {"name": ["pit", "async", "skip"]}, |
| {"name": ["pit", "async", "only"]}, |
| {"name": ["describe", "skip"]}, |
| {"name": ["describe", "only"]}, |
| {"name": ["pdescribe", "skip"]}, |
| {"name": ["pdescribe", "only"]}, |
| {"name": ["describeWithDate", "skip"]}, |
| {"name": ["describeWithDate", "only"]}, |
| {"name": ["describeBooleanFlag", "only"]}, |
| {"name": ["describeEnabledBooleanFlag", "only"]}, |
| {"name": "parseInt", "message": "See http://go/tsstyle#type-coercion"}, |
| {"name": "parseFloat", "message": "See http://go/tsstyle#type-coercion"}, |
| {"name": "Array", "message": "See http://go/tsstyle#array-constructor"}, |
| {"name": ["*", "innerText"], "message": "Use .textContent instead. http://go/typescript/patterns#browser-oddities"}, |
| {"name": ["goog", "setTestOnly"], "message": "See http://go/tsstyle#tests"} |
| ], |
| "ban-types": [true, |
| ["Object", "Use {} or 'object' instead. See http://go/ts-style#wrapper-types"], |
| ["String", "Use 'string' instead."], |
| ["Number", "Use 'number' instead."], |
| ["Boolean", "Use 'boolean' instead."], |
| // Add tests in google3/javascript/typescript/tslint/test/googleConfig/ban_types.ts.lint |
| ["AnyDuring(?!((CelloJs|AngularIvy|Drive|1TF|AllAsUnknown|GoogPromiseThen|Search|DWE|Assisted)Migration)).*", |
| "AnyDuringMigration is a quick-fix used during TypeScript migrations, and should be removed as soon as possible. See http://go/any_during_migration."] |
| ], |
| // go/keep-sorted start |
| "class-name": true, |
| "curly": [true, "ignore-same-line"], |
| "forin": true, |
| "interface-name": [true, "never-prefix"], |
| "interface-over-type-literal": true, |
| "jsdoc-format": true, |
| "label-position": true, |
| "member-access": [true, "no-public"], |
| "new-parens": true, |
| "no-angle-bracket-type-assertion": true, |
| "no-conditional-assignment": [true, "allow-within-parenthesis"], |
| "no-construct": true, |
| "no-debugger": true, |
| "no-default-export": true, |
| "no-duplicate-switch-case": true, |
| "no-namespace": [true, "allow-declarations"], |
| "no-reference": true, |
| "no-require-imports": true, |
| "no-string-throw": true, |
| "no-unsafe-finally": true, |
| "no-unused-expression": [true, "allow-fast-null-checks"], |
| "no-var-keyword": true, |
| "object-literal-shorthand": true, |
| "one-variable-per-declaration": [true, "ignore-for-loop"], |
| "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], |
| "prefer-const": [true, {"destructuring": "all"}], |
| "radix": true, |
| "semicolon": [true, "always", "strict-bound-class-methods"], |
| "static-this": true, |
| "switch-default": true, |
| "triple-equals": [true, "allow-null-check"], |
| "unnecessary-constructor": true |
| // go/keep-sorted end |
| } |
| } |