CLI
The main package ships a CLI that can scaffold or refresh the project config.
pnpm dlx @santi020k/eslint-config-basic init
pnpm dlx @santi020k/eslint-config-basic update
pnpm dlx @santi020k/eslint-config-basic explain
pnpm dlx @santi020k/eslint-config-basic explain-preset app
pnpm dlx @santi020k/eslint-config-basic inspect
pnpm dlx @santi020k/eslint-config-basic install
pnpm dlx @santi020k/eslint-config-basic doctor
pnpm dlx @santi020k/eslint-config-basic compatibility
pnpm dlx @santi020k/eslint-config-basic config-types
pnpm dlx @santi020k/eslint-config-basic migrate --to v3
pnpm dlx @santi020k/eslint-config-basic baseline
pnpm dlx @santi020k/eslint-config-basic profile
pnpm dlx @santi020k/eslint-config-basic snapshot
pnpm dlx @santi020k/eslint-config-basic diff
pnpm dlx @santi020k/eslint-config-basic docs
pnpm dlx @santi020k/eslint-config-basic generate-skillnpx @santi020k/eslint-config-basic init
npx @santi020k/eslint-config-basic update
npx @santi020k/eslint-config-basic explain
npx @santi020k/eslint-config-basic explain-preset app
npx @santi020k/eslint-config-basic inspect
npx @santi020k/eslint-config-basic install
npx @santi020k/eslint-config-basic doctor
npx @santi020k/eslint-config-basic compatibility
npx @santi020k/eslint-config-basic config-types
npx @santi020k/eslint-config-basic migrate --to v3
npx @santi020k/eslint-config-basic baseline
npx @santi020k/eslint-config-basic profile
npx @santi020k/eslint-config-basic snapshot
npx @santi020k/eslint-config-basic diff
npx @santi020k/eslint-config-basic docs
npx @santi020k/eslint-config-basic generate-skillyarn dlx @santi020k/eslint-config-basic init
yarn dlx @santi020k/eslint-config-basic update
yarn dlx @santi020k/eslint-config-basic explain
yarn dlx @santi020k/eslint-config-basic explain-preset app
yarn dlx @santi020k/eslint-config-basic inspect
yarn dlx @santi020k/eslint-config-basic install
yarn dlx @santi020k/eslint-config-basic doctor
yarn dlx @santi020k/eslint-config-basic compatibility
yarn dlx @santi020k/eslint-config-basic config-types
yarn dlx @santi020k/eslint-config-basic migrate --to v3
yarn dlx @santi020k/eslint-config-basic baseline
yarn dlx @santi020k/eslint-config-basic profile
yarn dlx @santi020k/eslint-config-basic snapshot
yarn dlx @santi020k/eslint-config-basic diff
yarn dlx @santi020k/eslint-config-basic docs
yarn dlx @santi020k/eslint-config-basic generate-skillbunx @santi020k/eslint-config-basic init
bunx @santi020k/eslint-config-basic update
bunx @santi020k/eslint-config-basic explain
bunx @santi020k/eslint-config-basic explain-preset app
bunx @santi020k/eslint-config-basic inspect
bunx @santi020k/eslint-config-basic install
bunx @santi020k/eslint-config-basic doctor
bunx @santi020k/eslint-config-basic compatibility
bunx @santi020k/eslint-config-basic config-types
bunx @santi020k/eslint-config-basic migrate --to v3
bunx @santi020k/eslint-config-basic baseline
bunx @santi020k/eslint-config-basic profile
bunx @santi020k/eslint-config-basic snapshot
bunx @santi020k/eslint-config-basic diff
bunx @santi020k/eslint-config-basic docs
bunx @santi020k/eslint-config-basic generate-skillWhat It Does
Section titled “What It Does”- Detects TypeScript, runtime, and supported optional integrations from
package.json. - Chooses
eslint.config.jsfor ESM projects. - Chooses
eslint.config.mjsotherwise. - Writes the zero-argument
defineConfig()setup. - Leaves framework selection to runtime detection, so the file stays stable as dependencies change.
- Prints detected config inputs with
explain. - Compares preset adoption by rule category with
explain-preset. - Prints detected inputs, package-manager details, workspace projects, and active config features with
inspect. - Installs missing framework and feature-category packages with
install. - Checks common v3 adoption issues with
doctor. - Checks Node, ESLint, TypeScript, and config-package peer compatibility.
- Generates human-readable
ESLINT_STANDARDS.mddocs withdocs. - Plans and safely applies v1-to-v2 or v2-to-v3 migrations with
migrate. - Creates an incremental-adoption suppression baseline with
baseline. - Compares single-threaded and multithreaded rule performance with
profile. - Saves and diffs effective-rule snapshots for representative files.
pnpm dlx @santi020k/eslint-config-basic initnpx @santi020k/eslint-config-basic inityarn dlx @santi020k/eslint-config-basic initbunx @santi020k/eslint-config-basic initThe default output remains the smallest zero-config setup. Use --explicit when
the detected TypeScript, framework, and feature selections should be committed
directly for reproducible configuration:
npx @santi020k/eslint-config-basic init --explicitIf the package is already installed locally, the basic-eslint bin is also available through your package manager’s local binary resolution.
basic-eslint --helpbasic-eslint --versionUpdate an Existing Config
Section titled “Update an Existing Config”pnpm dlx @santi020k/eslint-config-basic updatenpx @santi020k/eslint-config-basic updateyarn dlx @santi020k/eslint-config-basic updatebunx @santi020k/eslint-config-basic updateUse update to replace an older generated config with the stable zero-argument
v3 setup. Adding or removing dependencies no longer requires regenerating it.
Explain Detection
Section titled “Explain Detection”Use explain before committing a zero-config setup or after dependency changes.
npx @santi020k/eslint-config-basic explainIt prints the detected TypeScript state, preset, runtime, framework list, optional integrations, tools, and formats.
Pass a rule name and representative file to inspect the final value and every loaded flat-config entry that defines it:
npx @santi020k/eslint-config-basic explain @typescript-eslint/no-floating-promises --file src/index.tsThe report includes the effective severity and options, defining config names, and the likely config package responsible for the rule.
Explain Preset Adoption
Section titled “Explain Preset Adoption”Before changing an existing project to a broader preset, compare its current effective rules for a representative file:
npx @santi020k/eslint-config-basic explain-preset app --file src/index.tsThe report groups newly enabled rules into formatting, correctness, security,
framework, and domain sections. Add --analyze-source to count current findings
and preview autofix without writing files:
npx @santi020k/eslint-config-basic explain-preset app --analyze-sourceUse --semantic-only to preview fixes from correctness, security, framework,
and domain rules while leaving formatting fixes out of the preview. Add
--write only after reviewing that report:
npx @santi020k/eslint-config-basic explain-preset app \ --analyze-source \ --semantic-only \ --writeThe command refuses --write without --semantic-only. Source analysis also
lists file-reading scripts that apply regular expressions as possible
formatting-sensitive parsers. Review those scripts and run their validators
after any later formatting pass.
For TypeScript projects, source analysis first runs the consumer’s own compiler
with --noEmit. Module-resolution and other root compiler diagnostics are
shown before cascading type-aware unsafe-rule findings, so dependency or import
problems can be fixed before lint debt is classified. The structured result is
also available through --json.
To keep a migration incremental, generate a temporary override that disables only the newly enabled rules:
npx @santi020k/eslint-config-basic explain-preset app --file src/index.ts --compatibilityImport the generated .eslint-preset-app-compat.mjs after the preset config,
then remove its entries as findings are adopted. Use --output <path> to choose
another filename.
Inspect the Active Setup
Section titled “Inspect the Active Setup”Use inspect when you want a fuller view than explain, including package-manager detection, workspace package discovery, and features read from the active ESLint config when it can be loaded.
npx @santi020k/eslint-config-basic inspectFor automation, use JSON output:
npx @santi020k/eslint-config-basic inspect --jsonexplain, doctor, compatibility, config-types, migrate, profile,
snapshot, and diff support
--json for CI and migration tooling:
npx @santi020k/eslint-config-basic explain --jsonnpx @santi020k/eslint-config-basic doctor --jsonnpx @santi020k/eslint-config-basic migrate --jsonInstall Detected Dependencies
Section titled “Install Detected Dependencies”Use install after adding the lean Basic package. It detects frameworks,
TypeScript, and optional feature categories, then adds any missing config
packages with the project’s package manager.
npx @santi020k/eslint-config-basic installPreview the package-manager command without changing package.json:
npx @santi020k/eslint-config-basic install --dry-runCompanion config packages use the installed Basic major/minor range. If pnpm’s
minimumReleaseAge blocks that exact compatible release, the CLI reports the
policy explicitly instead of suggesting an older incompatible major.
Diagnose Setup Issues
Section titled “Diagnose Setup Issues”Use doctor while adopting v3 or after moving a project into a workspace. It
reports missing config files, configs that cannot be loaded, missing optional
framework or integration packages, missing lint scripts, and detected workspace
packages that are not represented with projects scoping.
It also detects when two different ESLint copies are installed — for example a project pinning an older ESLint while the config packages resolve their own ESLint dependency. The current release line supports ESLint 10, and parallel copies can make your editor and CLI apply slightly different rule behavior, so doctor warns and suggests aligning or deduping.
For Astro projects, doctor also reports mismatched Astro Doctor configuration, suggests the optional integration when Astro is detected, and checks the installed Astro Doctor package against the current Node.js and ESLint versions.
npx @santi020k/eslint-config-basic doctorAdd --verbose in a workspace to print a compact row for the root and every
detected project. Each row includes the selected runtime, TypeScript mode and
tsconfig, framework processors, formats, libraries, extensions, testing packs,
tools, and ignore patterns. Feature markers distinguish installed (I),
detected (D), and enabled (E) state:
npx @santi020k/eslint-config-basic doctor --verboseWhen a supporting optional package is installed but not activated, the verbose
report explains whether the project lacked a matching detection signal or the
active config did not load the detected pack. doctor --json always includes
the same structured data in its projects array, including inactive-package
reasons, without requiring --verbose.
Use --fix to create a missing generated config, add a lint script, declare
detected v3 packages, and rewrite straightforward v1 framework imports.
package.json and rewritten configs receive numbered .doctor.bak backups.
The command changes metadata only; run the package-manager install afterward.
npx @santi020k/eslint-config-basic doctor --fixdoctor --lite-install is deprecated and remains available only for existing
v2 lite migrations. It is scheduled for removal in v4. New v3 projects should
install basic plus their detected framework and category packages.
npx @santi020k/eslint-config-basic doctor --lite-installUse init --check when CI should verify that a project already has an ESLint flat config without writing a file:
npx @santi020k/eslint-config-basic init --checkCheck Compatibility
Section titled “Check Compatibility”compatibility resolves every declared @santi020k/eslint-config-* package
through Node package resolution, including dependencies declared with default
or named pnpm catalog: specifiers. It reports each declaration, resolved
manifest path, and version; checks the current Node runtime plus the consumer’s
declared engines.node range; and verifies ESLint and TypeScript peer ranges:
npx @santi020k/eslint-config-basic compatibilitynpx @santi020k/eslint-config-basic compatibility --jsonWhen Full is declared, the report shows both the installed Full version and the resolved Basic package that supplies composer behavior. Release CI also requires a Full changeset whenever one of its aggregated config packages is released, so batteries-included consumers receive meaningful aggregate updates without forcing every package to share the same minor version.
It exits with code 1 for missing or incompatible declared packages, or when the consumer Node range permits versions unsupported by an installed config package. This makes it suitable for dependency-update pull requests.
doctor reports the same consumer Node-range mismatch. Use doctor --fix to
update engines.node; the fixer computes the intersection of the existing
consumer range and all resolved config-package requirements, so supported union
branches are retained and the manifest is never broadened accidentally. As with
other doctor writes, the original manifest is saved as
package.json.doctor.bak.
Generate Team Standards
Section titled “Generate Team Standards”Use docs to create a project-local ESLINT_STANDARDS.md summary for humans.
npx @santi020k/eslint-config-basic docsThis is separate from generate-skill: docs writes a general standards document, while generate-skill targets AI coding assistant rule folders.
Migrate Between Major Versions
Section titled “Migrate Between Major Versions”Without a target, migrate retains its v1-to-v2 compatibility behavior:
npx @santi020k/eslint-config-basic migrateFor v2 projects, preview the complete v3 dependency and config migration:
npx @santi020k/eslint-config-basic migrate --to v3The command selects lean mode by default, detects required framework and
feature-pack packages, moves direct factory imports to their granular packages,
replaces removed aliases, migrates literal category arrays and the deprecated
integrations map to features, consolidates a single root-directory alias
into root, and migrates Remix to React Router. Dynamic expressions and
conflicting root aliases are left unchanged with a manual-action note. Config and
package.json changes are dry-run only until --write is passed:
npx @santi020k/eslint-config-basic migrate --to v3 --writeBoth modified files receive .v2.bak backups. Use --full to select the
batteries-included bundle, --check in CI to fail when a migration remains,
and --json for machine-readable plans.
For straightforward v1 configs, the historical migration remains available:
npx @santi020k/eslint-config-basic migrate --writeAdopt Stricter Rules Incrementally
Section titled “Adopt Stricter Rules Incrementally”baseline uses ESLint bulk suppressions to record existing errors while still
rejecting new violations:
npx @santi020k/eslint-config-basic baselineEnable a strict profile at the same time when the config is still the generated zero-argument form:
npx @santi020k/eslint-config-basic baseline --preset pedanticThe config is backed up before it is changed. As violations are fixed, remove obsolete entries with:
npx @santi020k/eslint-config-basic baseline --pruneCommit eslint-suppressions.json so local and CI behavior stays aligned.
Profile Lint Performance
Section titled “Profile Lint Performance”profile runs ESLint with rule timing enabled and compares concurrency
off with auto:
npx @santi020k/eslint-config-basic profileThe report includes total duration, file and diagnostic counts, parsing and rule time, the slowest rules, and the faster concurrency mode. Pin a mode or limit the lint targets when investigating:
npx @santi020k/eslint-config-basic profile --concurrency 4 --file srcnpx @santi020k/eslint-config-basic profile --jsonEnforce warning and performance budgets in CI:
npx @santi020k/eslint-config-basic profile \ --max-warnings 0 \ --max-duration 15000 \ --max-rule-time 2000The fastest successful concurrency run is evaluated and the command exits with code 1 when any configured budget is exceeded.
Snapshot Effective Rules
Section titled “Snapshot Effective Rules”Save the effective rule configuration for representative source, test, framework, and config files:
npx @santi020k/eslint-config-basic snapshotCommit .eslint-config-snapshot.json, then review dependency-update behavior:
npx @santi020k/eslint-config-basic diffdiff exits with code 1 when rules are added, removed, or changed. Use
repeatable --file options to select explicit representatives,
--snapshot-path to choose another file, or snapshot --check for the same
comparison in CI.
For a smaller review artifact that tracks only effective rule changes, omit globals, parser language options, and plugin registration metadata:
npx @santi020k/eslint-config-basic snapshot --rules-only \ --file src/index.ts \ --file src/index.test.tsThe snapshot records its scope, so later snapshot --check and diff commands
automatically use the same rules-only comparison.
Check Config Declaration Portability
Section titled “Check Config Declaration Portability”TypeScript-powered editors infer a declaration for eslint.config.* even when
the normal application typecheck excludes that file. Verify that the inferred
type is emit-safe and does not expose pnpm internals or the transitive
typescript-eslint implementation package:
npx @santi020k/eslint-config-basic config-typesThe command uses the consumer’s installed TypeScript and the closest tsconfig
for module settings, adding the local Node ambient boundary only when a config
uses Node globals, and emits only the selected ESLint config in memory.
Application-only ambient types do not leak into this isolated config check.
JavaScript configs are checked for declaration
portability without turning unrelated checkJs findings into migration
blockers; TypeScript configs retain their normal static checks. No declaration
files are written. Use repeatable --file options for project-scoped configs and
--json for CI reporting.
GitHub Action
Section titled “GitHub Action”The repository root publishes a composite action that installs the consumer, checks compatibility, uploads a structured Doctor report, verifies a committed effective-config snapshot, runs the normal lint command, and optionally checks config declarations and profiler budgets:
- uses: santi020k/eslint-config-basic@v3 with: install-command: pnpm install --frozen-lockfile lint-command: pnpm lint config-types: "true" profile: "true" max-warnings: "0" max-duration: "15000" max-rule-time: "2000"Set snapshot-check: "false" when the project intentionally does not commit
.eslint-config-snapshot.json. Set doctor-report: "false" when the workflow
must not upload the default eslint-config-doctor artifact, or use
doctor-artifact-name to avoid collisions in a matrix.
Set config-types: "true" after adopting a release with the portable config
boundary. Monorepos can provide whitespace-separated config paths through
config-types-files; otherwise the root eslint.config.* file is checked.
Generate Agent Standards (Beta)
Section titled “Generate Agent Standards (Beta)”The generate-skill command creates or updates ESLint standards files for AI coding assistants based on your project’s active configuration.
This is a beta feature and is non-breaking (it only adds/updates files in existing agent folders and instruction files).
Supported targets:
| Tool | Location | Format |
|---|---|---|
| Generic agents | .agent/skills/, .agents/skills/ | Markdown + front-matter |
| Claude Code | .claude/commands/ | Markdown |
| Cursor | .cursor/rules/ | MDC front-matter |
| Windsurf | .windsurf/rules/ | Markdown + front-matter |
| GitHub Copilot | .copilot/instructions/, .github/copilot-instructions.md | Markdown / guarded section |
| Aider | .aider/ | Markdown |
| Gemini | .gemini/styleguide.md | Markdown |
| Cline | .clinerules/ | Markdown |
| Roo Code | .roo/rules/ | Markdown |
| Kiro | .kiro/steering/ | Markdown + inclusion: always front-matter |
| AGENTS.md standard (Codex CLI, OpenCode, Jules, Amp, etc.) | root AGENTS.md | Guarded section appended/updated |
Folder targets are only written when the folder already exists, and AGENTS.md / .github/copilot-instructions.md are only updated when those files already exist — the command never creates tool folders for tools you do not use.
pnpm dlx @santi020k/eslint-config-basic generate-skillnpx @santi020k/eslint-config-basic generate-skillyarn dlx @santi020k/eslint-config-basic generate-skillbunx @santi020k/eslint-config-basic generate-skillUse --force if you want to overwrite existing standards files.
--force— overwrite existing skill files and guarded sections.--check— CI mode: compares existing skill files against freshly generated content without writing anything, and exits with code 1 when any file is stale or missing. Useful as a CI step or pre-push hook so agent rules never drift from the actual config.--create— scaffold a rootAGENTS.md(with the guarded ESLint-standards section) when the project has none. Without this flag,AGENTS.mdis only updated when it already exists.--with-eslint-mcp— add the officialeslint --mcpserver to the root.mcp.jsonwhile preserving other registered servers.
npx @santi020k/eslint-config-basic generate-skill --checknpx @santi020k/eslint-config-basic generate-skill --with-eslint-mcpWhen to Use Each Command
Section titled “When to Use Each Command”- Use
initwhen the project does not have an ESLint flat config yet. - Use
updatewhen the dependency graph changed and you want a fresh generated baseline. - Use
explainwhen you want to review what auto-detection found. - Use
explain <rule> --file <path>to trace an effective rule value. - Use
inspectwhen you need machine-readable details or active config feature extraction. - Use
doctorwhen a v3 setup is not behaving as expected. - Use
compatibilityduring dependency and runtime upgrades. - Use
config-typesto protect editor-facing config type inference in CI. - Use
docswhen you want a committed standards summary. - Use
migrate --to v3when upgrading a v2 consumer. - Use
baselinewhen enabling strict rules in an established codebase. - Use
profilewhen lint execution becomes expensive. - Use
snapshotanddiffto review rule changes during dependency upgrades. - Use manual editing when the config already has custom organization that you do not want regenerated.
Why the Generated Config Needs No Options
Section titled “Why the Generated Config Needs No Options”The CLI writes:
import { defineConfig } from '@santi020k/eslint-config-basic'
export default defineConfig()Detection happens when ESLint loads the config, so dependency changes do not make the generated file stale. Add arguments only when the project needs explicit options or local overrides.
- The CLI detects frameworks and
doctorexplains missing optional packages. - Generated files use the documented zero-argument
defineConfig()setup. - Existing
eslint.config.jsoreslint.config.mjsfiles are respected for updates. - The generated file is a starting point that you can still edit by hand.
Repository Links
Section titled “Repository Links”- Source Package: packages/basic
- Project Repository: santi020k/eslint-config-basic
Related Pages
Section titled “Related Pages”Did this page help?
Your answer stays in this browser. Share details on GitHub to help improve the docs.