Type object
File match tslint.json tslint.yaml tslint.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/tslint-json/latest.json
Source https://www.schemastore.org/tslint.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

extends string | array

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.

rulesDirectory string | array

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.

rules

A map of rules that will be used to lint TypeScript files. These rules apply to .ts and .tsx files.

All of: tsRules, rules
jsRules
109 nested properties
align

Enforces vertical alignment.

All of: rule boolean | object | array, object object
arrow-parens

Requires parentheses around the parameters of arrow function definitions.

All of: rule boolean | object | array, object object
arrow-return-shorthand

Suggests to convert () => { return x; } to () => x.

All of: rule boolean | object | array, object object
ban

Bans the use of specific functions or global methods.

All of: rule boolean | object | array, object object
ban-comma-operator

Bans the comma operator.

All of: rule boolean | object | array, object object
binary-expression-operand-order

In a binary expression, a literal should always be on the right-hand side if possible. For example, prefer 'x + 1' over '1 + x'.

All of: rule boolean | object | array, object object
class-name

Enforces PascalCased class and interface names.

All of: rule boolean | object | array, object object
comment-format

Enforces formatting rules for single-line comments.

All of: rule boolean | object | array, object object
completed-docs

Enforces documentation for important items be filled out.

All of: rule boolean | object | array, object object
curly

Enforces braces for if/for/do/while statements.

All of: rule boolean | object | array, object object
cyclomatic-complexity

Enforces a threshold of cyclomatic complexity.

All of: rule boolean | object | array, object object
deprecation

Warns when deprecated APIs are used.

All of: rule boolean | object | array, object object
encoding

Enforces UTF-8 file encoding.

All of: rule boolean | object | array, object object
eofline

Ensures the file ends with a newline.

All of: rule boolean | object | array, object object
file-header

Enforces a certain header comment for all files, matched by a regular expression.

All of: rule boolean | object | array, object object
file-name-casing array

Enforces a consistent file naming convention.

minItems=2
forin

Requires a for ... in statement to be filtered with an if statement.

All of: rule boolean | object | array, object object
import-blacklist

Disallows importing the specified modules directly via import and require. Instead only sub modules may be imported from that module.

All of: rule boolean | object | array, object object
import-spacing

Ensures proper spacing between import statement keywords

All of: rule boolean | object | array, object object
indent

Enforces indentation with tabs or spaces.

All of: rule boolean | object | array, object object
jsdoc-format

Enforces basic format rules for JSDoc comments.

All of: rule boolean | object | array, object object
label-position

Only allows labels in sensible locations.

All of: rule boolean | object | array, object object
linebreak-style

Enforces a consistent linebreak style.

All of: rule boolean | object | array, object object
max-classes-per-file

A file may not contain more than the specified number of classes

All of: rule boolean | object | array, object object
max-file-line-count

Requires files to remain under a certain number of lines

All of: rule boolean | object | array, object object
max-line-length

Requires lines to be under a certain max length.

All of: rule boolean | object | array, object object
member-ordering

Enforces member ordering.

All of: rule boolean | object | array, object object
newline-before-return

Enforces blank line before return when not the only line in the block.

All of: rule boolean | object | array, object object
newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

All of: rule boolean | object | array, object object
new-parens

Requires parentheses when invoking a constructor via the new keyword.

All of: rule boolean | object | array, object object
no-arg

Disallows use of arguments.callee.

All of: rule boolean | object | array, object object
no-bitwise

Disallows bitwise operators.

All of: rule boolean | object | array, object object
no-conditional-assignment

Disallows any type of assignment in conditionals.

All of: rule boolean | object | array, object object
no-consecutive-blank-lines

Disallows one or more blank lines in a row.

All of: rule boolean | object | array, object object
no-console

Bans the use of specified console methods.

All of: rule boolean | object | array, object object
no-construct

Disallows access to the constructors of String, Number, and Boolean.

All of: rule boolean | object | array, object object
no-debugger

Disallows debugger statements.

All of: rule boolean | object | array, object object
no-default-export

Disallows default exports in ES6-style modules.

All of: rule boolean | object | array, object object
no-duplicate-imports

Disallows multiple import statements from the same module.

All of: rule boolean | object | array, object object
no-duplicate-super

Warns if 'super()' appears twice in a constructor.

All of: rule boolean | object | array, object object
no-duplicate-switch-case

Prevents duplicate cases in switch statements.

All of: rule boolean | object | array, object object
no-duplicate-variable

Disallows duplicate variable declarations in the same block scope.

All of: rule boolean | object | array, object object
no-dynamic-delete

Bans usage of the delete operator with computed key expressions.

All of: rule boolean | object | array, object object
no-empty

Disallows empty blocks.

All of: rule boolean | object | array, object object
no-eval

Disallows eval function invocations.

All of: rule boolean | object | array, object object
no-for-in
All of: rule boolean | object | array, variant
no-for-in-array

Disallows iterating over an array with a for-in loop.

All of: rule boolean | object | array, object object
no-implicit-dependencies

Disallows importing modules that are not listed as dependency in the project's package.json.

All of: rule boolean | object | array, object object
no-import-side-effect

Avoid import statements with side-effect.

All of: rule boolean | object | array, object object
no-invalid-template-strings

Warns on use of ${ in non-template strings.

All of: rule boolean | object | array, object object
no-invalid-this

Disallows using the this keyword outside of classes.

All of: rule boolean | object | array, object object
no-irregular-whitespace

Disallow irregular whitespace outside of strings and comments

All of: rule boolean | object | array, object object
no-magic-numbers

Disallows the use constant number values outside of variable assignments. When no list of allowed values is specified, -1, 0 and 1 are allowed by default.

All of: rule boolean | object | array, object object
no-null-undefined-union

Forbid explicitly declared or implicitly returned union types with both null and undefined as members https://palantir.github.io/tslint/rules/no-null-undefined-union/

All of: rule boolean | object | array, variant
no-null-keyword

Disallows use of the null keyword literal.

All of: rule boolean | object | array, object object
no-parameter-reassignment

Disallows reassigning parameters.

All of: rule boolean | object | array, object object
no-reference

Disallows /// <reference path=> imports (use ES6-style imports instead).

All of: rule boolean | object | array, object object
no-return-await

Disallows unnecessary return await.

All of: rule boolean | object | array, object object
no-require-imports

Disallows invocation of require().

All of: rule boolean | object | array, object object
no-shadowed-variable

Disallows shadowing variable declarations.

All of: rule boolean | object | array, object object
no-sparse-arrays

Forbids array literals to contain missing elements.

All of: rule boolean | object | array, object object
no-string-literal

Forbids unnecessary string literal property access. Allows obj["prop-erty"] (can't be a regular property access). Disallows obj["property"] (should be obj.property).

All of: rule boolean | object | array, object object
no-string-throw

Flags throwing plain strings or concatenations of strings because only Errors produce proper stack traces.

All of: rule boolean | object | array, object object
no-submodule-imports

Disallows importing any submodule.

All of: rule boolean | object | array, object object
no-switch-case-fall-through

Disallows falling through case statements.

All of: rule boolean | object | array, object object
no-this-assignment

Disallows unnecessary references to this.

All of: rule boolean | object | array, object object
no-trailing-whitespace

Disallows trailing whitespace at the end of a line.

All of: rule boolean | object | array, object object
no-unnecessary-callback-wrapper

Replaces x => f(x) with just f. To catch more cases, enable only-arrow-functions and arrow-return-shorthand too.

All of: rule boolean | object | array, object object
no-unnecessary-class

Disallows classes that are not strictly necessary.

All of: rule boolean | object | array, object object
no-unnecessary-initializer

Forbids a 'var'/'let' statement or destructuring initializer to be initialized to 'undefined'.

All of: rule boolean | object | array, object object
no-unsafe-finally

Disallows control flow statements, such as return, continue break and throws in finally blocks.

All of: rule boolean | object | array, object object
no-unused-expression

Disallows unused expression statements.

All of: rule boolean | object | array, object object
no-use-before-declare

Disallows usage of variables before their declaration.

All of: rule boolean | object | array, object object
no-var-keyword

Disallows usage of the var keyword.

All of: rule boolean | object | array, object object
no-void-expression

Requires expressions of type void to appear in statement position.

All of: rule boolean | object | array, object object
number-literal-format

Checks that decimal literals should begin with '0.' instead of just '.', and should not end with a trailing '0'.

All of: rule boolean | object | array, object object
object-literal-key-quotes

Enforces consistent object literal property quote style.

All of: rule boolean | object | array, object object
object-literal-shorthand

Enforces use of ES6 object literal shorthand when possible.

All of: rule boolean | object | array, object object
object-literal-sort-keys

Checks ordering of keys in object literals.

All of: rule boolean | object | array, object object
one-line

Requires the specified tokens to be on the same line as the expression preceding them.

All of: rule boolean | object | array, object object
one-variable-per-declaration

Disallows multiple variable definitions in the same declaration statement.

All of: rule boolean | object | array, object object
only-arrow-functions

Disallows traditional (non-arrow) function expressions.

All of: rule boolean | object | array, object object
ordered-imports

Requires that import statements be alphabetized.

All of: rule boolean | object | array, object object
prefer-conditional-expression

Recommends to use a conditional expression instead of assigning to the same thing in each branch of an if statement.

All of: rule boolean | object | array, object object
prefer-const

Requires that variable declarations use const instead of let and var if possible.

All of: rule boolean | object | array, object object
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.

All of: rule boolean | object | array, object object
prefer-function-over-method

Warns for class methods that do not use 'this'.

All of: rule boolean | object | array, object object
prefer-method-signature

Prefer foo(): void over foo: () => void in interfaces and types.

All of: rule boolean | object | array, object object
prefer-object-spread

Enforces the use of the ES2015 object spread operator over Object.assign() where appropriate.

All of: rule boolean | object | array, object object
prefer-switch

Prefer a switch statement to an if statement with simple === comparisons.

All of: rule boolean | object | array, object object
prefer-template

Prefer a template expression over string literal concatenation.

All of: rule boolean | object | array, object object
prefer-while

Prefer while loops instead of for loops without an initializer and incrementor.

All of: rule boolean | object | array, variant
no-async-without-await

Force functions marked async contain an await or return statement https://palantir.github.io/tslint/rules/no-async-without-await/

All of: rule boolean | object | array, variant
promise-function-async

Requires any function or method that returns a promise to be marked async.

All of: rule boolean | object | array, object object
quotemark

Requires single or double quotes for string literals.

All of: rule boolean | object | array, object object
radix

Requires the radix parameter to be specified when calling parseInt.

All of: rule boolean | object | array, object object
restrict-plus-operands

When adding two variables, operands must both be of type number or of type string.

All of: rule boolean | object | array, object object
return-undefined

Prefer return; in void functions and return undefined; in value-returning functions.

All of: rule boolean | object | array, object object
semicolon

Enforces consistent semicolon usage at the end of every statement.

All of: rule boolean | object | array, object object
space-before-function-paren

Require or disallow a space before function parenthesis

All of: rule boolean | object | array, object object
space-within-parens

Enforces spaces within parentheses or disallow them.

All of: rule boolean | object | array, object object
switch-default

Require a default case in all switch statements.

All of: rule boolean | object | array, object object
switch-final-break

Checks whether the final clause of a switch statement ends in break;.

All of: rule boolean | object | array, object object
trailing-comma

Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

All of: rule boolean | object | array, object object
triple-equals

Requires === and !== in place of == and !=.

All of: rule boolean | object | array, object object
typeof-compare

Makes sure result of typeof is compared to correct string values

All of: rule boolean | object | array, object object
use-isnan

Enforces use of the isNaN() function to check for NaN references instead of a comparison to the NaN constant.

All of: rule boolean | object | array, object object
variable-name

Checks variable names for various errors.

All of: rule boolean | object | array, object object
whitespace

Enforces whitespace style conventions.

All of: rule boolean | object | array, object object
defaultSeverity string

The severity level used when a rule specifies "default" as its severity level. If undefined, "error" is used.

Default: "error"
Values: "error" "warning" "warn" "off" "none"
linterOptions object

Additional linter options.

1 nested properties
exclude string[]

An array of globs. Any file matching these globs will not be linted. All exclude patterns are relative to the configuration file they were specified in.

Definitions

rule boolean | object | array
severity string

Severity level. Level "error" will cause exit code 2.

Default: "default"
Values: "default" "error" "warning" "warn" "off" "none"
rules
align

Enforces vertical alignment.

All of: rule boolean | object | array, object object
arrow-parens

Requires parentheses around the parameters of arrow function definitions.

All of: rule boolean | object | array, object object
arrow-return-shorthand

Suggests to convert () => { return x; } to () => x.

All of: rule boolean | object | array, object object
ban

Bans the use of specific functions or global methods.

All of: rule boolean | object | array, object object
ban-comma-operator

Bans the comma operator.

All of: rule boolean | object | array, object object
binary-expression-operand-order

In a binary expression, a literal should always be on the right-hand side if possible. For example, prefer 'x + 1' over '1 + x'.

All of: rule boolean | object | array, object object
class-name

Enforces PascalCased class and interface names.

All of: rule boolean | object | array, object object
comment-format

Enforces formatting rules for single-line comments.

All of: rule boolean | object | array, object object
completed-docs

Enforces documentation for important items be filled out.

All of: rule boolean | object | array, object object
curly

Enforces braces for if/for/do/while statements.

All of: rule boolean | object | array, object object
cyclomatic-complexity

Enforces a threshold of cyclomatic complexity.

All of: rule boolean | object | array, object object
deprecation

Warns when deprecated APIs are used.

All of: rule boolean | object | array, object object
encoding

Enforces UTF-8 file encoding.

All of: rule boolean | object | array, object object
eofline

Ensures the file ends with a newline.

All of: rule boolean | object | array, object object
file-header

Enforces a certain header comment for all files, matched by a regular expression.

All of: rule boolean | object | array, object object
file-name-casing array

Enforces a consistent file naming convention.

minItems=2
forin

Requires a for ... in statement to be filtered with an if statement.

All of: rule boolean | object | array, object object
import-blacklist

Disallows importing the specified modules directly via import and require. Instead only sub modules may be imported from that module.

All of: rule boolean | object | array, object object
import-spacing

Ensures proper spacing between import statement keywords

All of: rule boolean | object | array, object object
indent

Enforces indentation with tabs or spaces.

All of: rule boolean | object | array, object object
jsdoc-format

Enforces basic format rules for JSDoc comments.

All of: rule boolean | object | array, object object
label-position

Only allows labels in sensible locations.

All of: rule boolean | object | array, object object
linebreak-style

Enforces a consistent linebreak style.

All of: rule boolean | object | array, object object
max-classes-per-file

A file may not contain more than the specified number of classes

All of: rule boolean | object | array, object object
max-file-line-count

Requires files to remain under a certain number of lines

All of: rule boolean | object | array, object object
max-line-length

Requires lines to be under a certain max length.

All of: rule boolean | object | array, object object
member-ordering

Enforces member ordering.

All of: rule boolean | object | array, object object
newline-before-return

Enforces blank line before return when not the only line in the block.

All of: rule boolean | object | array, object object
newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

All of: rule boolean | object | array, object object
new-parens

Requires parentheses when invoking a constructor via the new keyword.

All of: rule boolean | object | array, object object
no-arg

Disallows use of arguments.callee.

All of: rule boolean | object | array, object object
no-bitwise

Disallows bitwise operators.

All of: rule boolean | object | array, object object
no-conditional-assignment

Disallows any type of assignment in conditionals.

All of: rule boolean | object | array, object object
no-consecutive-blank-lines

Disallows one or more blank lines in a row.

All of: rule boolean | object | array, object object
no-console

Bans the use of specified console methods.

All of: rule boolean | object | array, object object
no-construct

Disallows access to the constructors of String, Number, and Boolean.

All of: rule boolean | object | array, object object
no-debugger

Disallows debugger statements.

All of: rule boolean | object | array, object object
no-default-export

Disallows default exports in ES6-style modules.

All of: rule boolean | object | array, object object
no-duplicate-imports

Disallows multiple import statements from the same module.

All of: rule boolean | object | array, object object
no-duplicate-super

Warns if 'super()' appears twice in a constructor.

All of: rule boolean | object | array, object object
no-duplicate-switch-case

Prevents duplicate cases in switch statements.

All of: rule boolean | object | array, object object
no-duplicate-variable

Disallows duplicate variable declarations in the same block scope.

All of: rule boolean | object | array, object object
no-dynamic-delete

Bans usage of the delete operator with computed key expressions.

All of: rule boolean | object | array, object object
no-empty

Disallows empty blocks.

All of: rule boolean | object | array, object object
no-eval

Disallows eval function invocations.

All of: rule boolean | object | array, object object
no-for-in
All of: rule boolean | object | array, variant
no-for-in-array

Disallows iterating over an array with a for-in loop.

All of: rule boolean | object | array, object object
no-implicit-dependencies

Disallows importing modules that are not listed as dependency in the project's package.json.

All of: rule boolean | object | array, object object
no-import-side-effect

Avoid import statements with side-effect.

All of: rule boolean | object | array, object object
no-invalid-template-strings

Warns on use of ${ in non-template strings.

All of: rule boolean | object | array, object object
no-invalid-this

Disallows using the this keyword outside of classes.

All of: rule boolean | object | array, object object
no-irregular-whitespace

Disallow irregular whitespace outside of strings and comments

All of: rule boolean | object | array, object object
no-magic-numbers

Disallows the use constant number values outside of variable assignments. When no list of allowed values is specified, -1, 0 and 1 are allowed by default.

All of: rule boolean | object | array, object object
no-null-undefined-union

Forbid explicitly declared or implicitly returned union types with both null and undefined as members https://palantir.github.io/tslint/rules/no-null-undefined-union/

All of: rule boolean | object | array, variant
no-null-keyword

Disallows use of the null keyword literal.

All of: rule boolean | object | array, object object
no-parameter-reassignment

Disallows reassigning parameters.

All of: rule boolean | object | array, object object
no-reference

Disallows /// <reference path=> imports (use ES6-style imports instead).

All of: rule boolean | object | array, object object
no-return-await

Disallows unnecessary return await.

All of: rule boolean | object | array, object object
no-require-imports

Disallows invocation of require().

All of: rule boolean | object | array, object object
no-shadowed-variable

Disallows shadowing variable declarations.

All of: rule boolean | object | array, object object
no-sparse-arrays

Forbids array literals to contain missing elements.

All of: rule boolean | object | array, object object
no-string-literal

Forbids unnecessary string literal property access. Allows obj["prop-erty"] (can't be a regular property access). Disallows obj["property"] (should be obj.property).

All of: rule boolean | object | array, object object
no-string-throw

Flags throwing plain strings or concatenations of strings because only Errors produce proper stack traces.

All of: rule boolean | object | array, object object
no-submodule-imports

Disallows importing any submodule.

All of: rule boolean | object | array, object object
no-switch-case-fall-through

Disallows falling through case statements.

All of: rule boolean | object | array, object object
no-this-assignment

Disallows unnecessary references to this.

All of: rule boolean | object | array, object object
no-trailing-whitespace

Disallows trailing whitespace at the end of a line.

All of: rule boolean | object | array, object object
no-unnecessary-callback-wrapper

Replaces x => f(x) with just f. To catch more cases, enable only-arrow-functions and arrow-return-shorthand too.

All of: rule boolean | object | array, object object
no-unnecessary-class

Disallows classes that are not strictly necessary.

All of: rule boolean | object | array, object object
no-unnecessary-initializer

Forbids a 'var'/'let' statement or destructuring initializer to be initialized to 'undefined'.

All of: rule boolean | object | array, object object
no-unsafe-finally

Disallows control flow statements, such as return, continue break and throws in finally blocks.

All of: rule boolean | object | array, object object
no-unused-expression

Disallows unused expression statements.

All of: rule boolean | object | array, object object
no-use-before-declare

Disallows usage of variables before their declaration.

All of: rule boolean | object | array, object object
no-var-keyword

Disallows usage of the var keyword.

All of: rule boolean | object | array, object object
no-void-expression

Requires expressions of type void to appear in statement position.

All of: rule boolean | object | array, object object
number-literal-format

Checks that decimal literals should begin with '0.' instead of just '.', and should not end with a trailing '0'.

All of: rule boolean | object | array, object object
object-literal-key-quotes

Enforces consistent object literal property quote style.

All of: rule boolean | object | array, object object
object-literal-shorthand

Enforces use of ES6 object literal shorthand when possible.

All of: rule boolean | object | array, object object
object-literal-sort-keys

Checks ordering of keys in object literals.

All of: rule boolean | object | array, object object
one-line

Requires the specified tokens to be on the same line as the expression preceding them.

All of: rule boolean | object | array, object object
one-variable-per-declaration

Disallows multiple variable definitions in the same declaration statement.

All of: rule boolean | object | array, object object
only-arrow-functions

Disallows traditional (non-arrow) function expressions.

All of: rule boolean | object | array, object object
ordered-imports

Requires that import statements be alphabetized.

All of: rule boolean | object | array, object object
prefer-conditional-expression

Recommends to use a conditional expression instead of assigning to the same thing in each branch of an if statement.

All of: rule boolean | object | array, object object
prefer-const

Requires that variable declarations use const instead of let and var if possible.

All of: rule boolean | object | array, object object
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.

All of: rule boolean | object | array, object object
prefer-function-over-method

Warns for class methods that do not use 'this'.

All of: rule boolean | object | array, object object
prefer-method-signature

Prefer foo(): void over foo: () => void in interfaces and types.

All of: rule boolean | object | array, object object
prefer-object-spread

Enforces the use of the ES2015 object spread operator over Object.assign() where appropriate.

All of: rule boolean | object | array, object object
prefer-switch

Prefer a switch statement to an if statement with simple === comparisons.

All of: rule boolean | object | array, object object
prefer-template

Prefer a template expression over string literal concatenation.

All of: rule boolean | object | array, object object
prefer-while

Prefer while loops instead of for loops without an initializer and incrementor.

All of: rule boolean | object | array, variant
no-async-without-await

Force functions marked async contain an await or return statement https://palantir.github.io/tslint/rules/no-async-without-await/

All of: rule boolean | object | array, variant
promise-function-async

Requires any function or method that returns a promise to be marked async.

All of: rule boolean | object | array, object object
quotemark

Requires single or double quotes for string literals.

All of: rule boolean | object | array, object object
radix

Requires the radix parameter to be specified when calling parseInt.

All of: rule boolean | object | array, object object
restrict-plus-operands

When adding two variables, operands must both be of type number or of type string.

All of: rule boolean | object | array, object object
return-undefined

Prefer return; in void functions and return undefined; in value-returning functions.

All of: rule boolean | object | array, object object
semicolon

Enforces consistent semicolon usage at the end of every statement.

All of: rule boolean | object | array, object object
space-before-function-paren

Require or disallow a space before function parenthesis

All of: rule boolean | object | array, object object
space-within-parens

Enforces spaces within parentheses or disallow them.

All of: rule boolean | object | array, object object
switch-default

Require a default case in all switch statements.

All of: rule boolean | object | array, object object
switch-final-break

Checks whether the final clause of a switch statement ends in break;.

All of: rule boolean | object | array, object object
trailing-comma

Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

All of: rule boolean | object | array, object object
triple-equals

Requires === and !== in place of == and !=.

All of: rule boolean | object | array, object object
typeof-compare

Makes sure result of typeof is compared to correct string values

All of: rule boolean | object | array, object object
use-isnan

Enforces use of the isNaN() function to check for NaN references instead of a comparison to the NaN constant.

All of: rule boolean | object | array, object object
variable-name

Checks variable names for various errors.

All of: rule boolean | object | array, object object
whitespace

Enforces whitespace style conventions.

All of: rule boolean | object | array, object object
tsRules
adjacent-overload-signatures

Enforces function overloads to be consecutive.

All of: rule boolean | object | array, object object
ban-ts-ignore

Bans "// @ts-ignore" comments from being used.

All of: rule boolean | object | array, variant
array-type

Requires using either 'T[]' or 'Array' for arrays.

All of: rule boolean | object | array, object object
await-promise

Warns for an awaited value that is not a Promise.

All of: rule boolean | object | array, object object
ban-types

Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

All of: rule boolean | object | array, object object
callable-types

An interface or literal type with just a call signature can be written as a function type.

All of: rule boolean | object | array, object object
interface-name

Requires interface names to begin with a capital 'I'

All of: rule boolean | object | array, object object
interface-over-type-literal

Prefer an interface declaration over a type literal (type T = { ... })

All of: rule boolean | object | array, object object
match-default-export-name

Requires that a default import have the same name as the declaration it imports. Does nothing for anonymous default exports.

All of: rule boolean | object | array, object object
member-access

Requires explicit visibility declarations for class members.

All of: rule boolean | object | array, object object
no-angle-bracket-type-assertion

Requires the use of as Type for type assertions instead of <Type>.

All of: rule boolean | object | array, object object
no-any

Disallows usages of any as a type declaration.

All of: rule boolean | object | array, object object
no-boolean-literal-compare

Warns on comparison to a boolean literal, as in x === true.

All of: rule boolean | object | array, object object
no-empty-interface

Forbids empty interfaces.

All of: rule boolean | object | array, object object
no-floating-promises

Promises returned by functions must be handled appropriately.

All of: rule boolean | object | array, object object
no-inferrable-types

Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.

All of: rule boolean | object | array, object object
no-inferred-empty-object-type

Disallow type inference of {} (empty object type) at function and constructor call sites

All of: rule boolean | object | array, object object
no-internal-module

Disallows internal module

All of: rule boolean | object | array, object object
no-mergeable-namespace

Disallows mergeable namespaces in the same file.

All of: rule boolean | object | array, object object
no-misused-new

Warns on apparent attempts to define constructors for interfaces or new for classes.

All of: rule boolean | object | array, object object
no-namespace

Disallows use of internal modules and namespaces.

All of: rule boolean | object | array, object object
no-non-null-assertion

Disallows non-null assertions.

All of: rule boolean | object | array, object object
no-object-literal-type-assertion

Forbids an object literal to appear in a type assertion expression. Casting to any is still allowed.

All of: rule boolean | object | array, object object
no-parameter-properties

Disallows parameter properties in class constructors.

All of: rule boolean | object | array, object object
no-redundant-jsdoc

Forbids JSDoc which duplicates TypeScript functionality.

All of: rule boolean | object | array, object object
no-reference-import

Don't <reference types="foo" /> if you import foo anyway.

All of: rule boolean | object | array, object object
no-unbound-method

Warns when a method is used as outside of a method call.

All of: rule boolean | object | array, object object
no-unnecessary-qualifier

Warns when a namespace qualifier (A.x) is unnecessary.

All of: rule boolean | object | array, object object
no-unnecessary-type-assertion

Warns if a type assertion does not change the type of an expression.

All of: rule boolean | object | array, object object
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.

All of: rule boolean | object | array, object object
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.

All of: rule boolean | object | array, object object
no-var-requires

Disallows the use of require statements except in import statements.

All of: rule boolean | object | array, object object
prefer-readonly

Requires that private variables are marked as readonly if they're never modified outside of the constructor.

All of: rule boolean | object | array, object object
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.
All of: rule boolean | object | array, object object
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.

All of: rule boolean | object | array, object object
typedef

Requires type definitions to exist.

All of: rule boolean | object | array, object object
typedef-whitespace

Requires or disallows whitespace for type definitions.

All of: rule boolean | object | array, object object
type-literal-delimiter

Checks that type literal members are separated by semicolons. Enforces a trailing semicolon for multiline type literals.

All of: rule boolean | object | array, object object
unified-signatures

Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter.

All of: rule boolean | object | array, object object
use-default-type-parameter

Warns if an explicitly specified type argument is the default for that type parameter.

All of: rule boolean | object | array, object object
function-constructor

Prevents using the built-in Function constructor.

All of: rule boolean | object | array, variant