latest
frou/deno-lint-pluginPlugin to provide additional rules for Deno's linter
This package works with Deno
JSR Score
94%
Published
4 months ago (0.1.2)
This repository contains a plugin to provide additional rules for Deno's linter.
To use it, add it to the "lint"
section in your own project's deno.json
or deno.jsonc
configuration file:
{ "lint": { "plugins": ["jsr:@duncan/lint"] } }
Rules
no-useless-undefined-initializer
Because let
declarations are initialized to undefined
by default, it's unnecessary to provide undefined
as an initializer.^1 ^2
This rule warns about such initializers, e.g.
// Bad let x = undefined; let y: string | undefined = undefined; // Good let x; let y: string | undefined;
...and an automated Quick-Fix is offered via LSP:
Add Package
deno add jsr:@duncan/lint
Import symbol
import * as lint from "@duncan/lint";
Import directly with a jsr specifier
import * as lint from "jsr:@duncan/lint";