schema
stringclasses 471
values | key
stringlengths 0
203
| description
stringlengths 0
4.37k
| object
stringlengths 2
322k
|
---|---|---|---|
tslint.json
|
prefer-conditional-expression
|
Recommends to use a conditional expression instead of assigning to the same thing in each branch of an if statement.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["check-else-if"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
prefer-const
|
Requires that variable declarations use `const` instead of `let` and `var` if possible.
|
{"definitions": {"options": {"type": "array", "items": {"type": "object", "properties": {"destructuring": {"type": "string", "enum": ["all", "any"]}}, "additionalProperties": false}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
prefer-for-of
|
Recommends a 'for-of' loop over a standard 'for' loop if the index is only used to access the array being iterated.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
prefer-function-over-method
|
Warns for class methods that do not use 'this'.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["allow-public", "allow-protected"]}, "minItems": 1, "maxItems": 2, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 3, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
prefer-method-signature
|
Prefer `foo(): void` over `foo: () => void` in interfaces and types.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
prefer-object-spread
|
Enforces the use of the ES2015 object spread operator over `Object.assign()` where appropriate.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
prefer-switch
|
Prefer a `switch` statement to an `if` statement with simple `===` comparisons.
|
{"definitions": {"options": {"type": "array", "items": {"type": "object", "properties": {"min-cases": {"type": "number", "minimum": 0}}, "additionalProperties": false}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
prefer-template
|
Prefer a template expression over string literal concatenation.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["allow-single-concat"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
prefer-while
|
Prefer while loops instead of for loops without an initializer and incrementor.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "additionalProperties": false}]}
|
tslint.json
|
no-async-without-await
|
Force functions marked async contain an await or return statement
https://palantir.github.io/tslint/rules/no-async-without-await/
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "additionalProperties": false}]}
|
tslint.json
|
promise-function-async
|
Requires any function or method that returns a promise to be marked async.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
quotemark
|
Requires single or double quotes for string literals.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["single", "double", "jsx-single", "jsx-double", "avoid-escape", "avoid-template"]}, "minItems": 1, "maxItems": 4, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 5, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
radix
|
Requires the radix parameter to be specified when calling `parseInt`.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
restrict-plus-operands
|
When adding two variables, operands must both be of type number or of type string.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
return-undefined
|
Prefer `return;` in void functions and `return undefined;` in value-returning functions.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
semicolon
|
Enforces consistent semicolon usage at the end of every statement.
|
{"definitions": {"options": {"type": "array", "items": [{"type": "string", "enum": ["always", "never"]}, {"type": "string", "enum": ["ignore-interfaces", "ignore-bound-class-methods", "strict-bound-class-methods"]}], "minItems": 1, "maxItems": 3}}, "allOf": [{}, {"items": [{"type": "boolean"}, {}, {}], "maxItems": 3, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
space-before-function-paren
|
Require or disallow a space before function parenthesis
|
{"definitions": {"options": {"type": "array", "items": {"type": "object", "properties": {"anonymous": {"type": "string", "enum": ["always", "never"]}, "asyncArrow": {"type": "string", "enum": ["always", "never"]}, "constructor": {"type": "string", "enum": ["always", "never"]}, "method": {"type": "string", "enum": ["always", "never"]}, "named": {"type": "string", "enum": ["always", "never"]}}, "additionalProperties": false}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
space-within-parens
|
Enforces spaces within parentheses or disallow them.
|
{"definitions": {"options": {"type": "array", "items": {"type": "number", "min": 0}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
switch-default
|
Require a `default` case in all `switch` statements.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
switch-final-break
|
Checks whether the final clause of a switch statement ends in `break;`.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["always"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
trailing-comma
|
Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.
|
{"definitions": {"options": {"type": "array", "items": {"type": "object", "properties": {"multiline": {"anyOf": [{"type": "string", "enum": ["always", "never"]}, {"type": "object", "properties": {"arrays": {"type": "string", "enum": ["always", "never", "ignore"]}, "exports": {"type": "string", "enum": ["always", "never", "ignore"]}, "functions": {"type": "string", "enum": ["always", "never", "ignore"]}, "imports": {"type": "string", "enum": ["always", "never", "ignore"]}, "objects": {"type": "string", "enum": ["always", "never", "ignore"]}, "typeLiterals": {"type": "string", "enum": ["always", "never", "ignore"]}}, "additionalProperties": false}]}, "singleline": {"anyOf": [{"type": "string", "enum": ["always", "never"]}, {"type": "object", "properties": {"arrays": {"type": "string", "enum": ["always", "never", "ignore"]}, "exports": {"type": "string", "enum": ["always", "never", "ignore"]}, "functions": {"type": "string", "enum": ["always", "never", "ignore"]}, "imports": {"type": "string", "enum": ["always", "never", "ignore"]}, "objects": {"type": "string", "enum": ["always", "never", "ignore"]}, "typeLiterals": {"type": "string", "enum": ["always", "never", "ignore"]}}, "additionalProperties": false}]}, "esSpecCompliant": {"type": "boolean"}}, "additionalProperties": false}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
esSpecCompliant
|
Option to forbid trailing comma after rest
|
{"type": "boolean"}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
triple-equals
|
Requires `===` and `!==` in place of `==` and `!=`.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["allow-null-check", "allow-undefined-check"]}, "minItems": 1, "maxItems": 3, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 3, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
typeof-compare
|
Makes sure result of `typeof` is compared to correct string values
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
use-isnan
|
Enforces use of the `isNaN()` function to check for NaN references instead of a comparison to the `NaN` constant.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
variable-name
|
Checks variable names for various errors.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["check-format", "require-const-for-all-caps", "allow-leading-underscore", "allow-trailing-underscore", "allow-pascal-case", "allow-snake-case", "ban-keywords"]}, "minItems": 1, "maxItems": 7, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 7, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
whitespace
|
Enforces whitespace style conventions.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["check-branch", "check-decl", "check-operator", "check-module", "check-separator", "check-rest-spread", "check-type", "check-typecast", "check-type-operator", "check-preblock", "check-postbrace"], "minItems": 1, "maxItems": 10, "uniqueItems": true}}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
adjacent-overload-signatures
|
Enforces function overloads to be consecutive.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
ban-ts-ignore
|
Bans "// @ts-ignore" comments from being used.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "additionalProperties": false}]}
|
tslint.json
|
array-type
|
Requires using either 'T[]' or 'Array<T>' for arrays.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["array", "generic", "array-simple"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
await-promise
|
Warns for an awaited value that is not a Promise.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string"}, "minItems": 1, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
ban-types
|
Bans specific types from being used. Does not ban the corresponding runtime objects from being used.
|
{"definitions": {"options": {"type": "array", "items": {"type": "array", "items": {"type": "string"}, "minItems": 1, "maxItems": 2}, "minItems": 1, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
callable-types
|
An interface or literal type with just a call signature can be written as a function type.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
interface-name
|
Requires interface names to begin with a capital 'I'
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["always-prefix", "never-prefix"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
interface-over-type-literal
|
Prefer an interface declaration over a type literal (`type T = { ... }`)
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
match-default-export-name
|
Requires that a default import have the same name as the declaration it imports.
Does nothing for anonymous default exports.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
member-access
|
Requires explicit visibility declarations for class members.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["no-public", "check-accessor", "check-constructor", "check-parameter-property"]}, "minItems": 1, "maxItems": 4, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 4, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-angle-bracket-type-assertion
|
Requires the use of `as Type` for type assertions instead of `<Type>`.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-any
|
Disallows usages of `any` as a type declaration.
|
{"allOf": [{}, {"items": [{"type": "boolean"}, {"type": "object", "properties": {"ignore-rest-args": {"type": "boolean"}}}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-boolean-literal-compare
|
Warns on comparison to a boolean literal, as in `x === true`.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-empty-interface
|
Forbids empty interfaces.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-floating-promises
|
Promises returned by functions must be handled appropriately.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string"}, "minItems": 1, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-inferrable-types
|
Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["ignore-params", "ignore-properties"]}, "minItems": 1, "maxItems": 2, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 3, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-inferred-empty-object-type
|
Disallow type inference of {} (empty object type) at function and constructor call sites
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-internal-module
|
Disallows internal `module`
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-mergeable-namespace
|
Disallows mergeable namespaces in the same file.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-misused-new
|
Warns on apparent attempts to define constructors for interfaces or `new` for classes.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-namespace
|
Disallows use of internal `module`s and `namespace`s.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["allow-declarations"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-non-null-assertion
|
Disallows non-null assertions.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-object-literal-type-assertion
|
Forbids an object literal to appear in a type assertion expression.
Casting to `any` is still allowed.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-parameter-properties
|
Disallows parameter properties in class constructors.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-redundant-jsdoc
|
Forbids JSDoc which duplicates TypeScript functionality.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-reference-import
|
Don't `<reference types="foo" />` if you import `foo` anyway.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-unbound-method
|
Warns when a method is used as outside of a method call.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["ignore-static"]}, "minItems": 1, "maxItems": 1}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-unnecessary-qualifier
|
Warns when a namespace qualifier (`A.x`) is unnecessary.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-unnecessary-type-assertion
|
Warns if a type assertion does not change the type of an expression.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string"}, "minItems": 1, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-unsafe-any
|
Warns when using an expression of type 'any' in a dynamic way.
Uses are only allowed if they would work for `{} | null | undefined`.
Type casts and tests are allowed.
Expressions that work on all values (such as `"" + x`) are allowed.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
no-unused-variable
|
Disallows unused imports, variables, functions and private class members. Similar to tsc's --noUnusedParameters and --noUnusedLocals options, but does not interrupt code compilation.
|
{"definitions": {"options": {"type": "array", "items": {"oneOf": [{"type": "string", "enum": ["check-parameters"]}, {"type": "object", "properties": {"ignore-pattern": {"type": "string"}}, "additionalProperties": false}]}, "minItems": 1, "maxItems": 2, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 3, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
no-var-requires
|
Disallows the use of require statements except in import statements.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
prefer-readonly
|
Requires that private variables are marked as `readonly` if they're never modified outside of the constructor.
|
{"definitions": {"options": {"type": "array", "items": {"enum": ["only-inline-lambdas"], "type": "string"}}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 2, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
strict-boolean-expressions
|
Restricts the types allowed in boolean expressions. By default only booleans are allowed.
The following nodes are checked:
* Arguments to the `!`, `&&`, and `||` operators
* The condition in a conditional expression (`cond ? x : y`)
* Conditions for `if`, `for`, `while`, and `do-while` statements.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["allow-null-union", "allow-undefined-union", "allow-string", "allow-enum", "allow-number", "allow-mix", "allow-boolean-or-undefined", "ignore-rhs"]}, "minItems": 1, "maxItems": 8, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 6, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
strict-type-predicates
|
Warns for type predicates that are always true or always false.
Works for 'typeof' comparisons to constants (e.g. 'typeof foo === "string"'), and equality comparison to 'null'/'undefined'.
(TypeScript won't let you compare '1 === 2', but it has an exception for '1 === undefined'.)
Does not yet work for 'instanceof'.
Does *not* warn for 'if (x.y)' where 'x.y' is always truthy. For that, see strict-boolean-expressions.
This rule requires `strictNullChecks` to work properly.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
typedef
|
Requires type definitions to exist.
|
{"definitions": {"options": {"type": "array", "items": {"type": "string", "enum": ["call-signature", "arrow-call-signature", "parameter", "arrow-parameter", "property-declaration", "variable-declaration", "member-variable-declaration", "object-destructuring", "array-destructuring"]}, "minItems": 1, "maxItems": 9, "uniqueItems": true}}, "allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": {}, "maxItems": 10, "uniqueItems": true, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
typedef-whitespace
|
Requires or disallows whitespace for type definitions.
|
{"definitions": {"options": {"type": "array", "items": [{"type": "object", "properties": {"call-signature": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "index-signature": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "parameter": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "property-declaration": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "variable-declaration": {"type": "string", "enum": ["nospace", "onespace", "space"]}}, "additionalProperties": false}, {"type": "object", "properties": {"call-signature": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "index-signature": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "parameter": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "property-declaration": {"type": "string", "enum": ["nospace", "onespace", "space"]}, "variable-declaration": {"type": "string", "enum": ["nospace", "onespace", "space"]}}, "additionalProperties": false}], "minItems": 1, "maxItems": 2}}, "allOf": [{}, {"items": [{"type": "boolean"}, {}, {}], "maxItems": 3, "properties": {"options": {"oneOf": [{}, {}]}, "severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
options
|
An option value or an array of multiple option values.
|
{"oneOf": [{}, {}]}
|
tslint.json
|
type-literal-delimiter
|
Checks that type literal members are separated by semicolons.
Enforces a trailing semicolon for multiline type literals.
|
{"allOf": [{}, {"items": [{"type": "boolean"}, {"type": "object", "properties": {"singleLine": {"type": "string", "enum": ["always", "never"]}}}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
unified-signatures
|
Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
use-default-type-parameter
|
Warns if an explicitly specified type argument is the default for that type parameter.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "properties": {"severity": {}}, "additionalProperties": false}]}
|
tslint.json
|
function-constructor
|
Prevents using the built-in Function constructor.
|
{"allOf": [{}, {"items": [{"type": "boolean"}], "additionalItems": false, "additionalProperties": false}]}
|
tslint.json
|
extends
|
The name of a built-in configuration preset, or a path or array of paths to other configuration files which are extended by this configuration. These values are handled using node module resolution semantics.
|
{"type": ["string", "array"], "items": {"type": "string"}}
|
tslint.json
|
rulesDirectory
|
A path to a directory or an array of paths to directories of custom rules. These values are handled using node module resolution semantics, if an `index.js` is placed in your rules directory.
|
{"type": ["string", "array"], "items": {"type": "string"}}
|
tslint.json
|
rules
|
A map of rules that will be used to lint TypeScript files. These rules apply to `.ts` and `.tsx` files.
|
{"allOf": [{}, {}]}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.