Skip to content

Extensions

The extensions option enables specialized rule packs that are useful across many project types.

ExtensionEnumUse It WhenAuto-Detected
RegExpExtension.RegexpThe project wants stronger regular-expression linting.No
UnicornExtension.UnicornThe project wants modern JavaScript best-practice rules.No
SonarJSExtension.SonarjsThe project wants maintainability-oriented rules.No
SecurityExtension.SecurityThe project wants additional security-oriented checks.Yes
PerfectionistExtension.PerfectionistThe project wants ordering and consistency rules.No
BestPracticesExtension.BestPracticesThe project wants light-weight quality rules with no extra dependencies.No
BoundariesExtension.BoundariesThe project wants dependency-free import boundary guardrails for package, generated-code, and test imports.No
A11yExtension.A11yThe project wants accessibility linting for JSX and Vue.Yes
BiomeExtension.BiomeThe project wants to enforce Biome formatting and rules.No
NodeExtension.NodeThe project is a Node.js codebase that wants eslint-plugin-n rules.No
CompatExtension.CompatThe project wants browser-compatibility checks against its browserslist.No
DeMorganExtension.DeMorganThe project wants negated logical expressions simplified automatically.No
DependExtension.DependThe project wants suggestions for lighter or native dependency alternatives.No
OxlintExtension.OxlintThe project runs Oxlint alongside ESLint and wants duplicate rules disabled.No
import { defineConfig, Extension } from '@santi020k/eslint-config-basic'
export default await defineConfig({
extensions: [
Extension.Unicorn, Extension.Security, Extension.Perfectionist, Extension.BestPractices, Extension.Boundaries
]
})

The Extension.BestPractices pack adds four quality rules that don’t require any external plugin dependencies:

  • no-console (warn) — catches leftover debug output
  • no-alert (error) — disallows browser alert, confirm, and prompt
  • complexity (warn, max 10) — flags overly complex functions
  • max-depth (warn, max 4) — flags deeply nested blocks

The Extension.Boundaries pack adds dependency-free import guardrails:

  • import/no-relative-packages (warn) — catches relative imports across package boundaries.
  • import/no-self-import (error) — prevents a module from importing itself.
  • no-restricted-imports (error) — blocks production imports from generated-code and test-only paths.

The Extension.Node pack applies eslint-plugin-n recommended rules. Module-resolution rules (n/no-missing-import, n/no-missing-require) are disabled for TypeScript files because the compiler already validates imports.

The Extension.Oxlint pack disables ESLint rules already covered by Oxlint so both linters can run side by side without duplicate reports — the same hybrid-linting model as the Biome extension.

Example usage:

import { defineConfig, Extension } from '@santi020k/eslint-config-basic'
export default await defineConfig({
extensions: [
// other extensions...
Extension.Oxlint
]
})

By adding this extension, ESLint will no longer report errors for rules that Oxlint can check. You are expected to run oxlint manually (e.g., in your CI pipeline or package.json lint scripts) alongside eslint to catch those issues much faster.

  • The Security extension is enabled by default through detection.
  • These extensions can be layered with frameworks, formats, and tooling without changing the core composition model.
  • Like Prettier and Biome, the Oxlint extension is applied after other extensions so its rule disables win.

Did this page help?

One click helps us spot documentation that needs another pass. No personal data is sent.