Skip to content
You are viewing the v1 archive. For current setup guidance, use the v3 docs; the v2 release is preserved at /v2/.

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
import { eslintConfig, Extension } from '@santi020k/eslint-config-basic'
export default eslintConfig({
extensions: [Extension.Unicorn, Extension.Security, Extension.Perfectionist, Extension.BestPractices]
})

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 Security extension is enabled by default through detection.
  • These extensions can be layered with frameworks, formats, and tooling without changing the core composition model.

Did this page help?

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