Skip to main content
Home

Plugin to provide additional rules for Deno's linter

This package works with Deno
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:

Screenshot

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@duncan/lint

Import symbol

import * as lint from "@duncan/lint";
or

Import directly with a jsr specifier

import * as lint from "jsr:@duncan/lint";