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.
Run the following command to add the lint plugin to your project:
deno add jsr:@neabyte/deno-lintTo 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
]
}
}
}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
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
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
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
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
MIT License - see LICENSE file for details.