Best Practices
ESLint best practices for Nova with one flat config, ordered layers, scoped rule groups, and sensible ignores for fast, predictable linting.
ESLint best practices for Nova with one flat config, ordered layers, scoped rule groups, and sensible ignores for fast, predictable linting.
Custom ESLint rules for catching unsafe patterns and enforcing consistent code style across JavaScript and TypeScript projects.
Composable ESLint and TSConfig presets with strict defaults and ordered layers for consistent style and predictable builds.
Disallow assigning to a const variable and immediately returning it when the expression can be returned directly.
Disallow bracket notation assignment and encourage Reflect.set for dynamic property writes on objects.
Disallow redundant unknown type annotations on catch clause variables because TypeScript defaults them to unknown.
Disallow destructuring patterns in callbacks, for-of loops, function parameters, variable declarations, and assignment expressions.
Require explicit boolean comparisons instead of relying on truthy/falsy coercion in conditions.
Disallow inline type annotations in code files and require named type aliases from definition files instead.
Disallow Logger.dev calls in production code so dev-only logging statements are caught before release.
Disallow unwrapped text inside code JSX elements to prevent MDX from parsing special characters as JSX tags.
Disallow flags on regex literals so shared patterns stay reusable and callers add flags at the call site via new RegExp.
Disallow inline regex literal expressions so patterns are centralized in a shared patterns file and reusable across the codebase.
Disallow importing shared type files in code files to enforce type layering where shared types flow through domain type files.
Disallow ternary expressions inside template literals to keep template strings readable and encourage extracting logic into variables.
Require blank lines between specific statement patterns for improved readability such as exit code before return and before loops.
Setup and configuration for Nova covering installation instructions and TypeScript and ESLint presets setup.
Require every non-empty switch case to wrap its body in a block so declarations stay scoped and branches stay independent.