@schafevormfenster/eslint-config
v0.0.8
Published
This package serves as the central **Configuration Hub** for ESLint across the `@schafevormfenster` monorepo. It orchestrates community standards (Next.js, TypeScript, Prettier) and integrates our internal custom rules.
Readme
@schafevormfenster/eslint-config
This package serves as the central Configuration Hub for ESLint across the @schafevormfenster monorepo. It orchestrates community standards (Next.js, TypeScript, Prettier) and integrates our internal custom rules.
Purpose
- Standardization: Ensures all projects (apps, libraries, tests) follow the same coding standards.
- Simplicity: Projects only need to install this one package instead of managing dozens of ESLint plugins and dependencies.
- Modularity: Provides composable configurations for different tech stacks (Next.js, Library, Playwright, etc.).
General Approach
This package exports Flat Config arrays that can be easily combined in your project's eslint.config.mjs. It wraps:
- Community Plugins:
@typescript-eslint,@next/eslint-plugin-next,eslint-plugin-zod,eslint-plugin-playwright, etc. - Internal Rules:
@schafevormfenster/eslint-plugin(Logging, Architecture, etc.).
Usage
In your application's eslint.config.mjs:
import { defineConfig } from "eslint/config";
import svfNext from "@schafevormfenster/eslint-config/next";
import svfLogging from "@schafevormfenster/eslint-config/logging";
import svfPlaywright from "@schafevormfenster/eslint-config/playwright";
export default defineConfig([
// 1. Base Stack (Next.js + TypeScript + React)
...svfNext,
// 2. Domain Specific Rules
...svfLogging,
// 3. Testing Overrides (only applies to test files)
...svfPlaywright,
// 4. Local Overrides
{
rules: {
"no-console": "warn"
}
}
]);Available Configurations
@schafevormfenster/eslint-config(default): Base TypeScript & Node.js rules.@schafevormfenster/eslint-config/next: For Next.js applications (includes React & Hooks).@schafevormfenster/eslint-config/library: For pure TypeScript libraries.@schafevormfenster/eslint-config/logging: Enforces internal logging standards.@schafevormfenster/eslint-config/architecture: Enforces file naming and folder structure.@schafevormfenster/eslint-config/caching: Enforces caching strategies (e.g. no cache in POST).@schafevormfenster/eslint-config/rest: Enforces REST API design standards (route structure, schemas).@schafevormfenster/eslint-config/stack: Enforces tech stack constraints (e.g. forbidden imports).@schafevormfenster/eslint-config/playwright: For E2E test suites.@schafevormfenster/eslint-config/vitest: For Unit test suites.
