@v4/eslint-config

The shared ESLint flat-config presets: a strict type-aware base plus Next.js and React-library variants.

2026-11-07

Overview

@v4/eslint-config is the shared ESLint tooling preset for the monorepo. It ships three flat-config presets — a strict, type-aware base and two framework variants — so every workspace lints identically against ESLint 9 with zero warnings tolerated.

The house standard is strict and type-aware: typescript-eslint's strictTypeChecked + stylisticTypeChecked presets, no any, explicit module boundaries, and Prettier compatibility (eslint-config-prettier). Because the base is type-aware (projectService: true), a consuming workspace must have a tsconfig covering the linted files.

Exports

Subpath Export Use
@v4/eslint-config/base config Strict type-aware base — the foundation both variants build on
@v4/eslint-config/next nextJsConfig Next.js apps — adds React, React Hooks, jsx-a11y and the @next/next core-web-vitals rules
@v4/eslint-config/react-internal config Internal React libraries (the component packages) — React + hooks + a11y, no Next

The two React variants add the same house JSX rules on top of the base: react/jsx-boolean-value (never), react/self-closing-comp, react/jsx-curly-brace-presence, react/no-array-index-key, and react-in-jsx-scope / prop-types turned off for React 19.

How a workspace consumes it

Each package (or app) has an eslint.config.mjs that spreads the right preset:

// packages/ghost-core/eslint.config.mjs — an internal React library
import { config } from "@v4/eslint-config/react-internal";

/** @type {import("eslint").Linter.Config[]} */
export default [...config, { ignores: ["dist/**"] }];
// apps/web/eslint.config.mjs — a Next.js app
import { nextJsConfig } from "@v4/eslint-config/next";

export default [...nextJsConfig /* , app-specific overrides */];

The package is a workspace:* dev dependency; it publishes nothing. pnpm lint runs eslint . --max-warnings 0 per workspace and is Turbo-cached at the repo root — see Monorepo and packages.