Skip to content

@stephansama/eslint-config

A modular, composable ESLint flat config package with 25+ configs covering JavaScript, TypeScript, frameworks, testing, and file formats. Supports auto-detection of installed packages and ships with a CLI for interactive setup.

Open Table of contents
Terminal window
pnpm install @stephansama/eslint-config
import { config, presets } from "@stephansama/eslint-config";
export default await config({
...presets.base,
});
ConfigPlugin(s)Description
baselineeslint-plugin-baseline-jsEnforces Baseline-widely-available web features; configurable availability level
javascript@eslint/jsRecommended JS rules with browser/node globals, JSX, ES2021
typescripttypescript-eslintType-checked recommended rules via projectService
e18e@e18e/eslint-pluginModern API preferences (Object.hasOwn, nullish coalescing, Array methods, etc.)
ConfigPlugin(s)Description
importseslint-plugin-import-xImport ordering and resolution with TypeScript resolver
jsdoceslint-plugin-jsdocJSDoc validation (TypeScript-aware; require-jsdoc disabled)
unicorneslint-plugin-unicornOpinionated best practices with custom abbreviation allowlist
perfectionisteslint-plugin-perfectionistNatural-sort ordering for imports, exports, and object keys
prettiereslint-plugin-prettierPrettier formatting as ESLint warnings
regexpeslint-plugin-regexpRegex best practices
commandeslint-plugin-commandMagic comment commands (e.g. // @keep-sorted)
ConfigPlugin(s)Description
packagejsoneslint-plugin-package-json, eslint-plugin-node-dependenciesValidates package.json — versions, deps, provenance; isLibrary option adds sort rules
pnpmeslint-plugin-pnpmEnforces pnpm catalog usage and workspace settings
gitignoreeslint-config-flat-gitignoreApplies .gitignore patterns as ESLint ignores
ConfigPlugin(s)Description
nodeeslint-plugin-nNode.js recommended rules; missing-import resolution delegated to imports
ConfigPlugin(s)Description
astroeslint-plugin-astroAstro recommended + jsx-a11y-strict (opt out via disableA11yStrict)
svelteeslint-plugin-svelteSvelte with TypeScript parser support
vuePlaceholder (empty config)
liteslint-plugin-litLit element rules (attribute names, binding positions, lifecycle, etc.)
storybookeslint-plugin-storybookStorybook flat/recommended
ConfigPlugin(s)Description
vitest@vitest/eslint-pluginVitest rules for **/*.test.{ts,js}; typeAware option (default: true)
zodeslint-plugin-zodZod schema best practices
ConfigPlugin(s)Description
jsoneslint-plugin-jsoncJSON/JSONC linting
markdown@eslint/markdownMarkdown code block linting; disables noisy rules inside fences
css@eslint/cssCSS rules (font fallbacks, selector complexity, layers, etc.)

Presets are pre-composed sets of configs you can spread into the config() call.

PresetConfigs Included
base (default)baseline, e18e, gitignore, imports, javascript, jsdoc, packagejson, perfectionist, pnpm, prettier, regexp, typescript, unicorn
zodzod
librarypackagejson with isLibrary: true
import { config, presets } from "@stephansama/eslint-config";
export default config({
...presets.base,
// enable additional configs
vitest: true,
node: true,
});
  • generate: Generates an ESLint config based on interactive prompts.
  • update: Updates ESLint dependencies to match current config options.
FlagAliasCommandDescriptionDefault
--config-cBothLocation of ESLint configuration fileeslint.config.ts
--verbose-vBothEnable verbose output
--package-json-pupdateLocation of package.json to updatepackage.json
Module Description

auto

builder

cli

configs

dependencies

environment

glob

index

order

presets

types