Overview
Use Nova Rules to catch unsafe patterns and enforce consistent code style. Pick the rules that match your workflow.
Install
If the package is not in your repo yet, go to Setup and Configure and choose Install into project.
Nova must be installed in your project before importing rules. This is because Node.js resolves imports from your project's node_modules folder.
If you wish, you can install Nova globally (into the system) and locally (into the project) at the same time. They will not conflict with each other.
Purpose and Scope
- What
- When
- Where
- Custom ESLint rules that catch patterns the built-in rule set does not cover.
- Focused checks that target specific risks like leaked dev logging and unscoped switch cases.
- No extra options required — enable each rule in your flat config and it works.
- Designed to complement existing ESLint rules, not replace them.
- When built-in ESLint rules leave gaps in your project's conventions.
- When you want consistent patterns across teams and projects.
- When you prefer targeted rules over broad presets.
- When you want each rule to focus on a single, well-defined concern.
- In new or existing codebases.
- In local development, CI, and code review workflows.
- In any repository structure.
- Alongside existing ESLint configs, plugins, and formatters.
Rules
All items below are targeted, independent, and safe to adopt. Enable only what you need. Each rule focuses on a single concern.
ESLint
Custom rules for JavaScript and TypeScript projects.
Formatting
| Rule | Synopsis |
|---|---|
| No Raw Text in Code | Ban unwrapped text inside <code> elements to prevent MDX parsing issues. |
| Require Padding Lines | Require blank lines between specific statement patterns for readability. |
Nova
| Rule | Synopsis |
|---|---|
| No Logger.dev | Flag Logger.dev calls so dev-only logging gets caught before production. |
Patterns
| Rule | Synopsis |
|---|---|
| No Assign Then Return | Return expressions directly instead of assigning to an intermediate variable. |
| No Bracket Assignment | Use Reflect.set() instead of bracket notation assignment. |
| No Destructuring | Ban destructuring in callbacks, loops, functions, declarations, assignments. |
| No Implicit Boolean | Require explicit comparisons instead of truthy/falsy coercion in conditions. |
| No Ternary in Template Literal | Extract ternary expressions out of template literal interpolation slots. |
| Switch Case Blocks | Require block-wrapped switch cases so declarations stay scoped per branch. |
Regex
| Rule | Synopsis |
|---|---|
| No Regex Literal Flags | Ban flags on regex literals so callers add flags at the call site. |
| No Regex Literals | Ban inline regex literals so patterns are centralized in a shared file. |
TypeScript
| Rule | Synopsis |
|---|---|
| No Catch Unknown Annotation | Remove redundant : unknown annotations from catch clause variables. |
| No Inline Type Annotation | Require named type aliases instead of inline type annotations in code files. |
| No Shared Type Import | Prevent code files from importing shared type files directly. |
Using Nova presets? See Presets for composable ESLint and TSConfig layers.