GitShow/denoland/deno_lint
denoland

deno_lint

Blazing fast linter for JavaScript and TypeScript written in Rust

by denoland
denojavascriptlinterstypescript
Star on GitHubForkWebsite

Rust

1.6k stars188 forks98 contributorsActive · 16h agoSince 20200.84.1MIT

Meet the team

See all 98 on GitHub →
bartlomieju
bartlomieju256 contributions
magurotuna
magurotuna233 contributions
dsherret
dsherret81 contributions
denobot
denobot70 contributions
lucacasonato
lucacasonato40 contributions
DzmitryRamaniuk
DzmitryRamaniuk38 contributions
marvinhagemeister
marvinhagemeister38 contributions
disizali
disizali31 contributions

Languages

View on GitHub →
Rust98.7%
TypeScript1.1%
JavaScript0.2%

Commit activity

Last 12 weeks · 26 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
50
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 16h ago
See all on GitHub →
bartlomieju
feat: port bad-char-at-comparison, bad-object-literal-comparison, number-arg-out-of-rangeOpenPR

Second batch of oxc-correctness oxlint ports (the comparison family), following in denoland/deno_lint#1521. All three are purely syntactic, with tests ported from the upstream oxc fixtures. bad-char-at-comparison — flags comparing the result of against a string whose length is not 1. returns a single UTF-16 code unit, so the comparison can never be true. bad-object-literal-comparison — flags , and similar. An empty object/array literal is a fresh reference that is never equal to anything, so the comparison is always false (or always true for inequality). Only empty literals are flagged; is left alone. number-arg-out-of-range** — flags out-of-range radix/precision arguments to (2–36), / (0–20), and (1–21). Out-of-range values throw a at runtime. Handles both and . Docs for these (and the rest of the bucket) are in denoland/docs#3378. All three are tagged , matching oxc's classification. As with #1521, this is the same on-by-default question — happy to drop the tag and land them opt-in first if you prefer.

bartlomieju · 16h ago
bartlomieju
feat(no-invalid-fetch-options): add `no-invalid-fetch-options` ruleOpenPR

Ports the oxlint rule to deno_lint as a native Rust rule. The rule flags a passed to or when the is or (case-insensitive), since a body is not allowed for those methods and results in a at runtime. An absent defaults to , so a body with no method is also flagged. A of or is treated as absent and not reported. Method values are read from string and single-element template literals; values that cannot be read statically (variable references, member expressions, enums, type annotations, conditionals, call results) are treated as unknown and not flagged. Both calls and are covered, matching oxc. Reference: https://github.com/oxc-project/oxc/blob/main/crates/oxc_linter/src/rules/unicorn/no_invalid_fetch_options.rs This port intentionally only inspects the value when it is written as an inline string or single-element template literal. It does not resolve method values that come from another statement, a TypeScript enum member, or a typed function parameter. As a result, six of oxc's fixtures are deliberately not reproduced here (they would require cross-statement symbol resolution, enum member resolution, or parameter type-annotation analysis): `headfunction foo(method: "HEAD" | "GET") { return new Request(url, {method, body: ""}); }enum Method { Get = "GET" } ... fetch("/", { method: Method.Get, body: "" })enum Method { Foo = "GET" } ... fetch("/", { method: Method.Foo, body: "" })passas const`-, and member-expression-typed method cases. A less-capable rule simply flags fewer things, so no genuine valid case regresses. Tagged RECOMMENDED (on by default) — flagging for maintainer sign-off.

bartlomieju · 1d ago
bartlomieju
feat(no-thenable): add `no-thenable` ruleOpenPR

Ports the oxlint rule to deno_lint as a native Rust rule. It flags declaring an object or class member named , which makes the value accidentally "thenable" and can break when the value is used in an expression. The rule detects the following cases: Object literals with a property — shorthand, key/value, method, getter, or setter, whether the key is the identifier , the string , a `thenconstletvar"then"thenstatic#thenObject.defineProperty(foo, "then", ...)Reflect.defineProperty(foo, "then", ...)Object.fromEntries([["then", ...]])thenfoo.then = 1foo["then"] += 1thenexport const then = 1export function then() {}export class then {}export { then }export { x as then }`). The diagnostic message and help text, as well as the complete pass/fail fixture arrays, are ported from the oxc reference: https://github.com/oxc-project/oxc/blob/main/crates/oxc_linter/src/rules/unicorn/no_thenable.rs Tagged RECOMMENDED (on by default) — flagging for maintainer sign-off.

bartlomieju · 1d ago

Recent fixes

View closed PRs →
bartlomieju
Revert "feat: add `node-builtin-specifier` rule (#1306)"MergedPR

This reverts the rule (#1306). The rule hardcodes its own copy of the Node.js built-in module list, which has to be kept in sync by hand and inevitably drifts from the set of modules Deno actually supports. That canonical list already lives in the Deno repo under (exposed as ), so the rule is being moved there and reimplemented on top of it. Keeping it in deno_lint would mean maintaining a second, divergent source of truth. The rule is reintroduced in denoland/deno as an extended CLI lint rule that reuses the existing built-in module list: denoland/deno#35628.

bartlomieju · 1d ago
marvinhagemeister
feat: add `node-builtin-specifier` ruleMergedPR

Adds a new lint rule that warns when a Node.js built-in module is imported with a bare specifier (e.g. ) instead of the required prefix (e.g. ). It covers both static imports and dynamic calls and ships an autofix that adds the prefix. The rule is tagged and emits diagnostics at warning severity rather than error, so existing code keeps working while nudging users toward the correct specifier. Warning severity is wired through the API added in #1487. Invalid: Valid: Documentation is added in denoland/docs#3366. Related https://github.com/denoland/deno/issues/24930

marvinhagemeister · 1d ago
Structured data for AI agents

Repository: denoland/deno_lint. Description: Blazing fast linter for JavaScript and TypeScript written in Rust Stars: 1586, Forks: 188. Primary language: Rust. Languages: Rust (98.7%), TypeScript (1.1%), JavaScript (0.2%). License: MIT. Homepage: https://lint.deno.land/ Topics: deno, javascript, linters, typescript. Latest release: 0.84.1 (1mo ago). Open PRs: 45, open issues: 123. Last activity: 16h ago. Community health: 50%. Top contributors: bartlomieju, magurotuna, dsherret, denobot, lucacasonato, DzmitryRamaniuk, marvinhagemeister, disizali, petamoriken, cknight and others.

·@ofershap

Replace github.com with gitshow.dev