Overview & Quick Start
ESLint 9 Flat Config standards
@nexload-sdk/eslint-config
v9.39.2 Stable ReleasedShared authoritative ESLint configurations for the Nexload SDK monorepo
@nexload-sdk/eslint-config provides a unified, strict ESLint 9 Flat Config system for TypeScript repositories. Built on typescript-eslint v8, eslint-plugin-perfectionist, and eslint-plugin-unicorn, it enforces clean architectural discipline, deterministic import order, semantic whitespace padding, and zero-any type safety.
10-Second Code Snippet
Section titled “10-Second Code Snippet”Create eslint.config.mjs in your project root using the nexloadConfig() universal factory:
import { nexloadConfig } from "@nexload-sdk/eslint-config";
export default nexloadConfig({ framework: "next", // "next" | "react" | "node" | "payload" | "none" typeAware: true,});The Enforced Mental Model
Section titled “The Enforced Mental Model”This configuration enforces unambiguous, production-grade engineering standards:
1. Mandatory Kebab-Case Filenames (unicorn/filename-case)
Section titled “1. Mandatory Kebab-Case Filenames (unicorn/filename-case)”Every file in your source tree must use kebab-case.ts. CamelCase, PascalCase, or snake_case file names trigger compile-blocking linter errors.
✅ src/user-profile.ts✅ src/auth-guard.spec.ts❌ src/UserProfile.ts❌ src/user_profile.ts2. Deterministic Perfectionist Imports (perfectionist/sort-imports)
Section titled “2. Deterministic Perfectionist Imports (perfectionist/sort-imports)”Imports are automatically organized alphabetically into strict semantic groups separated by blank lines:
- Type imports (
import type { ... }) - Node.js built-ins (
node:fs,node:path) - External dependencies (
react,zod,payload) - Internal ecosystem packages (
@nexload-sdk/*) - Parent & sibling relative imports (
../,./)
3. Absolute Zero-any Policy (@typescript-eslint/no-explicit-any)
Section titled “3. Absolute Zero-any Policy (@typescript-eslint/no-explicit-any)”Using any is treated as a hard error. Types must be properly narrowed at boundary points using unknown, generics, type guards, or Zod schemas.
4. Semantic Whitespace Padding (@stylistic/padding-line-between-statements)
Section titled “4. Semantic Whitespace Padding (@stylistic/padding-line-between-statements)”Blank lines are enforced around returns, classes, exports, and multi-line declarations to eliminate visual clutter and ensure code remains human-readable and AI-friendly.
5. Floating Promise Prevention (@typescript-eslint/no-floating-promises)
Section titled “5. Floating Promise Prevention (@typescript-eslint/no-floating-promises)”Async operations must be explicitly awaited or handled with .catch(). Unhandled background promises fail CI immediately.
Available Presets & Factory
Section titled “Available Presets & Factory”| Preset Export | Target Environment | Included Plugins |
|---|---|---|
baseConfig | Universal TypeScript foundation | typescript-eslint, perfectionist, unicorn, @stylistic, prettier |
nodeConfig | Node.js backend services | Base + Node globals and environment rules |
reactConfig | React libraries & SPAs | Base + react-hooks |
nextjsConfig | Next.js App Router | Base + react-hooks + @next/eslint-plugin-next |
payloadConfig | Payload CMS applications | Base + react-hooks + Payload-specific admin & server boundary rules |
nexloadConfig(options) | Universal configurable factory | Combines presets, custom rules, ignores, and overrides in one call |
Installation & Requirements
Section titled “Installation & Requirements”pnpm add -D @nexload-sdk/eslint-config eslint@^9.0.0 typescriptPeer requirements: eslint >= 9.0.0, typescript >= 5.0.0.