Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
NeaByteLab/Deno-LintLint plugin collection for enforcing naming conventions, type annotations, and error handling patterns in Deno code with auto-fix support.
This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun



JSR Score
100%
Published
4 weeks ago (0.3.1)
@neabyte/deno-lint
A collection of custom lint rules built on Deno's native lint plugin system.
Requires Deno 2.2.0+. Learn more about Deno Lint Plugins.
Installation
Run the following command to add the lint plugin to your project:
deno add jsr:@neabyte/deno-lint
To exclude specific rules, configure them in your deno.json:
{ "lint": { "plugins": [ "jsr:@neabyte/deno-lint@0.3.1" // add this module ], "rules": { "exclude": [ "deno-lint/require-error-handling", "deno-lint/explicit-parameter-types" // Exclude any rules you don't want to use ] } } }
Available Rules
Type Safety & Annotations
explicit-parameter-types- Requires explicit type annotations on parametersexplicit-return-types- Requires explicit return type annotationsprefer-const-assertions- Prefersas constover type assertion for better type inference
Modern JavaScript Features
prefer-nullish-coalescing- Prefers nullish coalescing (??) over logical OR (||) for null/undefined checksprefer-optional-chain- Prefers optional chaining (?.) over logical AND (&&) for property accessprefer-template-literals- Prefers template literals over string concatenation
Array & Object Operations
prefer-array-every- PrefersArray.every()over manual iteration patternsprefer-array-flat- PrefersArray.flat()over manual flattening patternsprefer-array-includes- PrefersArray.includes()over manual indexOf checksprefer-array-some- PrefersArray.some()over manual iteration patternsprefer-spread- Prefers spread syntax (...) over manual array/object operations
Code Quality & Style
async-function-naming- Enforces async functions to have 'Async' suffixprefer-arrow-callback- Prefers arrow functions over regular function expressions in callback contextsprefer-early-return- Prefers early returns over nested conditions for better readability
Error Handling & Safety
prefer-promise-reject-errors- Enforces Error objects in Promise.reject() callsprefer-string-starts-ends-with- PrefersString.startsWith()andString.endsWith()over substring checksrequire-error-handling- Ensures Deno file operations are properly awaited
License
MIT License - see LICENSE file for details.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@neabyte/deno-lint
Import symbol
import * as deno_lint from "@neabyte/deno-lint";
Import directly with a jsr specifier
import * as deno_lint from "jsr:@neabyte/deno-lint";
Add Package
pnpm i jsr:@neabyte/deno-lint
pnpm dlx jsr add @neabyte/deno-lint
Import symbol
import * as deno_lint from "@neabyte/deno-lint";
Add Package
yarn add jsr:@neabyte/deno-lint
yarn dlx jsr add @neabyte/deno-lint
Import symbol
import * as deno_lint from "@neabyte/deno-lint";
Add Package
vlt install jsr:@neabyte/deno-lint
Import symbol
import * as deno_lint from "@neabyte/deno-lint";
Add Package
npx jsr add @neabyte/deno-lint
Import symbol
import * as deno_lint from "@neabyte/deno-lint";
Add Package
bunx jsr add @neabyte/deno-lint
Import symbol
import * as deno_lint from "@neabyte/deno-lint";