Presets / Eslint
DX - Code Style
Enforce a strict, project-wide code style for JS and TS with a stylistic formatting baseline plus focused groups of core ESLint rules.
Read articlePresets / Eslint
Enforce a strict, project-wide code style for JS and TS with a stylistic formatting baseline plus focused groups of core ESLint rules.
Read articleRules / Eslint / Patterns
Disallow assigning to a const variable and immediately returning it when the expression can be returned directly.
Read articleRules / Eslint / Patterns
Disallow await inside loops so sequential calls that should be parallelized with Promise.all are caught early.
Read articleRules / Eslint / Patterns
Disallow extracting a multi-condition boolean into a single-use variable for the next if-statement.
Read articleRules / Eslint / Patterns
Disallow bracket notation assignment and encourage Reflect.set for dynamic property writes on objects.
Read articleRules / Eslint / Patterns
Disallow calling methods via bracket notation with a static string key when dot notation is available.
Read articleRules / Eslint / Typescript
Disallow redundant unknown type annotations on catch clause variables because TypeScript defaults them to unknown.
Read articleRules / Eslint / Formatting
Require arrow functions with complex concise bodies to use an explicit block body.
Read articleRules / Eslint / Syntax
Disallow destructuring patterns in callbacks, for-of loops, function parameters, variable declarations, and assignment expressions.
Read articleRules / Eslint / Typescript
Disallow usage of the any type and require unknown with type guards or a specific type instead.
Read articleRules / Eslint / Conventions
Require explicit boolean comparisons instead of relying on truthy/falsy coercion in conditions.
Read articleRules / Eslint / Typescript
Disallow inline type annotations in code files and require named type aliases from definition files instead.
Read articleRules / Eslint / Formatting
Disallow multiline string content including backslash continuation, visual newlines in template literals, and internal escape sequences.
Read articleRules / Eslint / Syntax
Disallow binary, octal, and hexadecimal numeric literal forms and require parseInt with an explicit base instead.
Read articleRules / Eslint / Syntax
Disallow the optional chaining operator so null and undefined checks are explicit.
Read articleRules / Eslint / Regex
Disallow flags on regex literals so shared patterns stay reusable and callers add flags at the call site via new RegExp.
Read articleRules / Eslint / Regex
Disallow inline regex literal expressions so patterns are centralized in a shared patterns file and reusable across the codebase.
Read articleRules / Eslint / Syntax
Disallow rest parameters in function signatures so parameters are listed explicitly.
Read articleRules / Eslint / Typescript
Disallow importing shared type files in code files to enforce type layering where shared types flow through domain type files.
Read articleRules / Eslint / Patterns
Disallow template literal placeholder syntax in regular strings so missing backticks are caught before the expression appears literally in output.
Read articleRules / Eslint / Formatting
Disallow ternary expressions inside template literals to keep template strings readable and encourage extracting logic into variables.
Read articleRules / Eslint / Patterns
Disallow use of variables, constants, functions, classes, and types before they are defined.
Read articleRules / Eslint / Typescript
Require bracket notation instead of dot notation for property access on project-defined plain objects.
Read articleRules / Eslint / Conventions
Require an explicit return statement at the end of void function bodies so every function signals its exit point.
Read articleRules / Eslint / Conventions
Require #hash notation for private class members instead of the private keyword.
Read articleRules / Eslint / Formatting
Require 6-group import ordering with regular imports first (Node built-ins, third-party, local) then type imports (Node built-ins, third-party, local).
Read articleRules / Eslint / Jsdoc
Require a body paragraph in JSDoc blocks that explains why the declaration exists.
Read articleRules / Eslint / Jsdoc
Require JSDoc summary lines to follow the hierarchy chain derived from the file path and method name.
Read articleRules / Eslint / Jsdoc
Require vertical alignment of param types, names, and dashes in JSDoc blocks.
Read articleRules / Eslint / Jsdoc
Require param descriptions to match the parameter name with the first letter capitalized and a trailing period.
Read articleRules / Eslint / Jsdoc
Require a leading JSDoc block on every documentable symbol so no class, function, method, or property ships undocumented.
Read articleRules / Eslint / Jsdoc
Require a private tag in JSDoc blocks for private class members to keep documentation consistent with access modifiers.
Read articleRules / Eslint / Jsdoc
Require every @returns tag to contain only a type in braces, with no trailing description.
Read articleRules / Eslint / Jsdoc
Require a @since tag in every JSDoc block and validate its value to track when API members were introduced.
Read articleRules / Eslint / Jsdoc
Require JSDoc tags to follow the canonical order with exactly one blank line between adjacent tag groups.
Read articleRules / Eslint / Conventions
Require kebab-case file names for TypeScript files.
Read articleRules / Eslint / Formatting
Require expanded formatting for parenthesized groups in mixed-operator logical expressions.
Read articleRules / Eslint / Formatting
Require each operand to be on its own line when a logical expression exceeds the allowed inline count.
Read articleRules / Eslint / Conventions
Require the node: protocol when importing Node.js built-in modules.
Read articleRules / Eslint / Formatting
Require blank lines between specific statement patterns for improved readability such as exit code before return and before loops.
Read articleRules / Eslint / Formatting
Require parenthesized condition in ternary expressions.
Read articleRules / Eslint / Typescript
Require type alias names in definition files to start with the class name prefix derived from the file path.
Read articleRules / Eslint / Conventions
Require explicit undefined initializer when declaring variables without a value.
Read articleRules / Eslint / Conventions
Require every non-empty switch case to wrap its body in a block so declarations stay scoped and branches stay independent.
Read article