deno_lint docs

Ignore directives

Files

To ignore a whole file use // deno-lint-ignore-file at the top of the file:

// deno-lint-ignore-file

function foo(): any {
  // ...
}

The ignore directive must be placed before the first statement or declaration:

// Copyright 2020-2021 the Deno authors. All rights reserved. MIT license.

/**
 * Some JS doc
 **/

// deno-lint-ignore-file

import { bar } from "./bar.js";

function foo(): any {
  // ...
}

You can also ignore certain diagnostics in the whole file

// deno-lint-ignore-file no-explicit-any no-empty

function foo(): any {
  // ...
}

Diagnostics

To ignore specific diagnostics use // deno-lint-ignore <codes...> on the preceding line of the offending line.

// deno-lint-ignore no-explicit-any
function foo(): any {
  // ...
}

// deno-lint-ignore no-explicit-any explicit-function-return-type
function bar(a: any) {
  // ...
}

You must specify the names of the rules to be ignored.