@kapowaz/eslint-config
@kapowaz/eslint-config
Shared ESLint (flat config) and Prettier configuration for @kapowaz
React/TypeScript projects, inside and outside the monorepo.
The package bundles its own ESLint plugins as dependencies, so consumers only
install the package plus eslint and prettier:
pnpm add -D @kapowaz/eslint-config eslint prettier
ESLint
Flat config only (ESLint ≥ 10). Two composable layers are exported:
@kapowaz/eslint-config(default) — base: ESLint + typescript-eslint recommended rules, perfectionist import/export sorting, andeslint-config-prettierso Prettier owns all formatting.@kapowaz/eslint-config/react— React Hooks + React Refresh (Vite) rules and browser globals for.ts/.tsx, plus story/vite.config.tsoverrides.
A TypeScript library / non-React project
// eslint.config.mjs
import base from '@kapowaz/eslint-config';
export default base;
A React (Vite) app
// eslint.config.mjs
import { defineConfig } from 'eslint/config';
import base from '@kapowaz/eslint-config';
import react from '@kapowaz/eslint-config/react';
export default defineConfig(base, react);
Prettier
The canonical Prettier config ships from the same package. Reference it from
package.json rather than copying a .prettierrc around:
// package.json
{
"prettier": "@kapowaz/eslint-config/prettier",
}
Run Prettier as its own tool — not through ESLint. There is no
eslint-plugin-prettier in this config by design: formatting belongs to
Prettier (prettier --write locally and in your editor, prettier --check in
CI), and eslint-config-prettier keeps ESLint from fighting it.
Why no eslint-plugin-prettier?
Running Prettier as an ESLint rule reports every formatting nit as a lint error,
slows ESLint down, and couples the two tools. The modern convention — and
Prettier's own recommendation — is to run them separately and use
eslint-config-prettier (included here) to disable conflicting rules.