Getting Started
Version 3 makes the smallest dependency graph the default without making the configuration verbose.
Requirements
Section titled “Requirements”- Node.js
>=22.19.0 - ESLint
^10.0.0
-
Install the lean package
pnpm add -D eslint @santi020k/eslint-config-basicnpm install -D eslint @santi020k/eslint-config-basicyarn add -D eslint @santi020k/eslint-config-basicbun add -d eslint @santi020k/eslint-config-basicInstall the config packages required by every detected framework and optional feature:
Terminal window npx @santi020k/eslint-config-basic installThe CLI uses the project’s package manager and skips dependencies that are already declared. For React, the equivalent manual install is:
pnpm add -D @santi020k/eslint-config-reactnpm install -D @santi020k/eslint-config-reactyarn add -D @santi020k/eslint-config-reactbun add -d @santi020k/eslint-config-react -
Create the zero-config setup
eslint.config.mjs import { defineConfig } from '@santi020k/eslint-config-basic'export default defineConfig() -
Run ESLint
Terminal window npx eslint . --max-warnings=0
The direct call detects TypeScript, frameworks, runtime, and supported optional
tooling relative to eslint.config.mjs. That remains stable when an editor
starts ESLint from another working directory. Missing optional packages produce
an error with the exact package name to install.
Prefer one package?
Section titled “Prefer one package?”Install the full bundle when dependency footprint is less important than a single batteries-included dependency:
pnpm add -D eslint @santi020k/eslint-config-fullnpm install -D eslint @santi020k/eslint-config-fullyarn add -D eslint @santi020k/eslint-config-fullbun add -d eslint @santi020k/eslint-config-fullexport { default } from '@santi020k/eslint-config-full/recommended'Customize only when needed
Section titled “Customize only when needed”import { defineConfig } from '@santi020k/eslint-config-basic'
export default await defineConfig({ strict: 'ci', typescript: 'strict'})Continue with Installation for package selection or the v2 to v3 migration guide for an existing project.
Editor and CI
Section titled “Editor and CI”Add a shared script to package.json so local and CI runs allow zero warnings:
{ "scripts": { "lint": "eslint . --max-warnings=0" }}VS Code workspace setup
Section titled “VS Code workspace setup”Install the Microsoft ESLint extension
and let it load ESLint from your workspace. ESLint 10 always uses flat config;
eslint.useFlatConfig is unnecessary and ignored for that version.
For a monorepo with package-owned configs, this setting lets the extension infer working directories from package manifests and config files:
{ "eslint.workingDirectories": [{ "mode": "auto" }]}If inference selects the wrong package, use explicit working directories for your workspace layout. Check the ESLint output channel and restart the ESLint server after changing dependencies. The config factory anchors detection to its config file; use Monorepo to choose root or package-owned configs.
GitHub Actions with pnpm
Section titled “GitHub Actions with pnpm”This consumer workflow uses the repository’s declared pnpm version and the
current Node 22 release line. Declare packageManager in your package.json,
commit pnpm-lock.yaml, and verify the selected Node version against the engines
of every installed framework and feature pack.
name: Lint
on: pull_request: push: branches: [main]
permissions: contents: read
jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - run: pnpm install --frozen-lockfile - run: pnpm exec basic-eslint compatibility - run: pnpm run lintThe pinned Quality setup action
reads packageManager and sets up Node and pnpm. Keep your project’s type checks,
tests, and build alongside this lint job. For upgrade review, follow the
verification checklist.
Did this page help?
Your answer stays in this browser. Share details on GitHub to help improve the docs.