deno_lint docs

Showing 73 out of 90 rules

Requires overload signatures to be adjacent to each other.

View More

ban-ts-comment

Recommended

Disallows the use of Typescript directives without a comment.

View More

ban-types

Recommended

Bans the use of primitive wrapper objects (e.g. String the object is a wrapper

View More

Warns the usage of unknown rule codes in ignore directives

View More

Requires deno-lint-ignore to be annotated with one or more rule names.

View More

Warns unused ignore directives

View More

camelcase

Recommended

Enforces the use of camelCase in variable names

View More

Verifies the correct usage of constructors and calls to super().

View More

for-direction

Recommended

Requires for loop control variables to increment in the correct direction

View More

getter-return

Recommended

Requires all property getter functions to return a value

View More

Enforce conventional usage of array construction

View More

Requires that async promise executor functions are not used

View More

Requires lexical declarations (let, const, function and class) in switch

View More

no-class-assign

Recommended

Disallows modifying variables of class declarations

View More

Disallows comparing against negative zero (-0).

View More

no-cond-assign

Recommended

Disallows the use of the assignment operator, =, in conditional statements.

View More

Disallows the use of a constant expression in conditional test

View More

no-control-regex

Recommended

Disallows the use ascii control characters in regular expressions

View More

no-debugger

Recommended

Disallows the use of the debugger statement

View More

no-delete-var

Recommended

Disallows the deletion of variables

View More

Warns the usage of the deprecated Deno APIs

View More

no-dupe-args

Recommended

Disallows using an argument name more than once in a function signature

View More

Disallows using a class member function name more than once

View More

no-dupe-else-if

Recommended

Disallows using the same condition twice in an if/else if statement

View More

no-dupe-keys

Recommended

Disallows duplicate keys in object literals.

View More

Disallows using the same case clause in a switch statement more than once

View More

no-empty

Recommended

Disallows the use of empty block statements.

View More

Disallows using the empty character class in a regular expression

View More

no-empty-enum

Recommended

Disallows the declaration of an empty enum

View More

Disallows the declaration of an empty interface

View More

no-empty-pattern

Recommended

Disallows the use of empty patterns in destructuring

View More

no-ex-assign

Recommended

Disallows the reassignment of exception parameters

View More

no-explicit-any

Recommended

Disallows use of the any type

View More

Disallows unnecessary boolean casts

View More

Disallows unnecessary non-null assertions

View More

no-extra-semi

Recommended

<!-- deno-fmt-ignore-file -->

View More

no-fallthrough

Recommended

Disallows the implicit fallthrough of case statements

View More

no-func-assign

Recommended

Disallows the overwriting/reassignment of an existing function

View More

no-global-assign

Recommended

Disallows assignment to native Javascript objects

View More

no-import-assign

Recommended

Disallows reassignment of imported module bindings

View More

Disallows easily inferrable types

View More

Disallows variable or function definitions in nested blocks

View More

Disallows specifying invalid regular expressions in RegExp constructors

View More

Warns the wrong usage of triple-slash reference directives.

View More

Disallows the use of non-space or non-tab whitespace characters

View More

no-misused-new

Recommended

Disallows defining constructors for interfaces or new for classes

View More

no-namespace

Recommended

Disallows the use of namespace and module keywords in TypeScript code.

View More

no-new-symbol

Recommended

Disallows the use of new operators with built-in Symbols

View More

no-obj-calls

Recommended

Disallows calling built-in global objects like functions

View More

no-octal

Recommended

Disallows expressing octal numbers via numeric literals beginning with 0

View More

Disallows the use of Object.prototype builtins directly

View More

no-redeclare

Recommended

Disallows redeclaration of variables, functions, parameters with the same name.

View More

no-regex-spaces

Recommended

Disallows multiple spaces in regular expression literals.

View More

no-self-assign

Recommended

Disallows self assignments

View More

no-setter-return

Recommended

Disallows returning values from setters.

View More

Disallows shadowing of restricted names.

View More

no-this-alias

Recommended

Disallows assigning variables to this.

View More

Disallows use of this or super before calling super() in constructors.

View More

no-unreachable

Recommended

Disallows the unreachable code after the control flow statements.

View More

Disallows the use of control flow statements within finally blocks.

View More

Disallows the usage of negation operator ! as the left operand of relational

View More

no-unused-labels

Recommended

Disallows unused labels.

View More

no-unused-vars

Recommended

Enforces all variables used at least once.

View More

no-var

Recommended

Enforces the use of block scoped variables over more error prone function scoped

View More

no-window-prefix

Recommended

Disallows the use of Web APIs via the window object.

View More

no-with

Recommended

Disallows the usage of with statements.

View More

prefer-as-const

Recommended

Recommends using const assertion (as const) over explicitly specifying literal

View More

prefer-const

Recommended

Recommends declaring variables with [const] over [let].

View More

Recommends the use of namespace keyword over module keyword when declaring

View More

require-await

Recommended

Disallows async functions that have no await expression

View More

require-yield

Recommended

Disallows generator functions that have no yield.

View More

use-isnan

Recommended

Disallows comparisons to NaN.

View More

valid-typeof

Recommended

Restricts the use of the typeof operator to a specific set of string literals.

View More