1---2name: deno-js-linter3description: Pure JavaScript/ECMAScript linting guidance based on Deno's lint rules, filtered to language-level concerns only. No React, JSX, Fresh, Deno-specific, Node.js-specific, or TypeScript type-system rules. Use when writing, reviewing, or refactoring vanilla JavaScript to catch bugs, avoid pitfalls, and enforce idiomatic style.4---56# Deno JS Linter — Claude Code Skill78> Pure JavaScript/ECMAScript linting guidance distilled from Deno's lint rules.9> Framework-free — no React, JSX, Fresh, Deno runtime APIs, Node.js, or10> TypeScript type-system rules. 70 rules organized by concern, with do/don't11> code examples.1213## When to Use This Skill1415- Writing or reviewing vanilla JavaScript / ECMAScript code16- Catching language-level bugs before they reach production17- Avoiding common JS pitfalls (loose equality, misused async, eval)18- Enforcing consistent style and modern idioms (const, camelCase, etc.)1920## Core Workflow21221. **Identify context** — What kind of JS work? Logic-heavy (load bugs), async code (load pitfalls), new code (load style)232. **Load references** — Pull in relevant category files from the table below243. **Apply rules** — Use the do/don't examples to guide code or review254. **Cite rules** — Reference the Deno lint rule name (e.g., `no-const-assign`) when flagging issues2627## Reference Guide2829| Category | Reference | Rules | Load When |30|----------|-----------|-------|-----------|31| Bugs & Correctness | `references/bugs.md` | 41 | Wrong assignments, unreachable code, broken control flow, invalid regex |32| Pitfalls | `references/pitfalls.md` | 18 | Dubious comparisons, misused async, eval, debug leftovers, empty blocks |33| Style & Idioms | `references/style.md` | 11 | const vs let vs var, naming, cleaner declarations |3435## Critical Rules (Always Apply)3637The highest-impact pure JS rules — keep these in mind at all times.3839### Bugs — Catch Real Mistakes4041| Don't | Do | Rule |42|-------|-----|------|43| Reassign `const` variables | Use `let` if reassignment needed | `no-const-assign` |44| Write code after `return` | Remove unreachable code | `no-unreachable` |45| Duplicate keys in objects | Use unique keys | `no-dupe-keys` |46| Duplicate `case` labels | Use unique case values | `no-duplicate-case` |47| Reassign function declarations | Use `const fn = ...` if needed | `no-func-assign` |48| Return from setters | Setters must not return | `no-setter-return` |49| Omit `return` from getters | Getters must return a value | `getter-return` |50| Use `new Symbol()` | Call `Symbol()` without `new` | `no-new-symbol` |51| Forget `super()` in subclass constructor | Always call `super()` in extending classes | `constructor-super` |52| Assign in conditions `if (x = 1)` | Use `===` for comparison | `no-cond-assign` |53| Use `hasOwnProperty` directly | Use `Object.hasOwn()` or `Object.prototype.hasOwnProperty.call()` | `no-prototype-builtins` |5455### Pitfalls — Probably Wrong5657| Don't | Do | Rule |58|-------|-----|------|59| `x == y` (loose equality) | `x === y` (strict equality) | `eqeqeq` |60| `eval("code")` | Avoid eval entirely | `no-eval` |61| `debugger` in committed code | Remove before committing | `no-debugger` |62| `throw "error"` (string literal) | `throw new Error("error")` | `no-throw-literal` |63| `await` in a loop body | Collect promises, use `Promise.all()` | `no-await-in-loop` |64| `await` in a non-async function | Mark the function `async` | `no-await-in-sync-fn` |65| `async function` with no `await` | Remove `async` or add `await` | `require-await` |66| Leave empty `catch {}` blocks | Handle or comment the error | `no-empty` |6768### Style — Write Idiomatic JS6970| Don't | Do | Rule |71|-------|-----|------|72| `var x = 1` | `const x = 1` or `let x = 1` | `no-var` |73| `let x = 1` (never reassigned) | `const x = 1` | `prefer-const` |74| `let a = 1, b = 2` | `let a = 1; let b = 2;` | `single-var-declarator` |75| `!!someValue` (double negation) | `Boolean(someValue)` | `no-extra-boolean-cast` |76| Unused variables left in code | Remove or prefix with `_` | `no-unused-vars` |7778## Constraints7980### MUST DO81- Reference the specific Deno lint rule name when flagging issues82- Prioritize recommended rules (enabled by default) over optional ones83- Load category reference files for detailed examples before reviewing8485### MUST NOT DO86- Include React, JSX, Fresh, Deno runtime, Node.js, or TypeScript type-system guidance (use other skills for those)87- Assume Deno lint is in use — check the project first88- Override project-specific lint configurations without discussion