Optional configs

Anti-slop, pnpm workspace, e18e, regexp and command integrations.

These integrations are either opt-in, auto-detected, or always on. See the options reference for every key.

Antislop

Experimental. On by default since v6. Guards against low-value patterns that often show up in generated code.

eslint.config.js
import { vinicuncaESLint } from '@vinicunca/eslint-config';

export default vinicuncaESLint({
  // Turn the rules off
  antislop: false,
});

eslint-plugin-slop and eslint-plugin-sonarjs are dependencies of this config, so you don't install them yourself. The enabled rule set is maintained in-house and may change without a semver bump.

slop
boolean | OptionsSlop
Defaults to true when antislop is on. slop/no-em-dash runs on every file type the config lints (source, JSON, YAML, TOML, Markdown and so on), except code blocks inside Markdown, which are already checked as part of the Markdown text. An object is forwarded as settings.slop (cwd, inspection: 'full' | 'uncommitted' | 'recent-changes').
sonarjs
boolean
Defaults to true. A curated subset (duplicated branches, dead stores, identical expressions, and similar) — not the plugin's full recommended set.
cognitiveComplexity
number | false
Defaults to 15. Pass false to disable sonarjs/cognitive-complexity.
overrides
Rules
Merged into vinicunca/antislop/rules/javascript.

Pair this with jscpd and knip for copy-paste and unused-export checks.

pnpm

Experimental. On when a pnpm-workspace.yaml exists in the current directory or a parent. Uses eslint-plugin-pnpm.

eslint.config.js
export default vinicuncaESLint({
  pnpm: {
    catalogs: true,
    sort: true,
  },
});
catalogs
boolean
Defaults to true when the workspace file mentions catalog: or catalogs:. Enforces catalog usage in package.json.
json
boolean
Defaults to true unless jsonc is false. Lints package.json (pnpm/json-prefer-workspace-settings, pnpm/json-valid-catalog).
yaml
boolean
Defaults to true unless yaml is false. Lints pnpm-workspace.yaml (unused/duplicate catalog items, plus pnpm/yaml-enforce-settings for shellEmulator, trustPolicy: 'no-downgrade' and minimumReleaseAgeExcludePrune).
sort
boolean
Defaults to true (the type docs say false). Sorts keys in pnpm-workspace.yaml.

Catalog autofixes are skipped in the editor (autofix: !isInEditor).

e18e

On by default. Rules from @e18e/eslint-plugin for modern APIs and faster patterns.

eslint.config.js
export default vinicuncaESLint({
  e18e: {
    modernization: true,
    performanceImprovements: true,
    moduleReplacements: false,
  },
});
modernization
boolean
Defaults to true.
performanceImprovements
boolean
Defaults to true.
moduleReplacements
boolean
Defaults to false in practice. The type docs say type === 'lib' && isInEditor, but the factory does not pass type into this integration.

Always off unless you override them: e18e/prefer-static-regex (because type inside the integration stays 'app'), e18e/prefer-array-at, e18e/prefer-array-from-map, e18e/prefer-array-to-reversed, e18e/prefer-array-to-sorted, e18e/prefer-array-to-spliced, e18e/prefer-spread-syntax.

Regexp

On by default. eslint-plugin-regexp recommended rules.

eslint.config.js
export default vinicuncaESLint({
  regexp: { level: 'warn' },
});

level: 'warn' downgrades every error to a warning. Use overrides for individual rules.

Command

Always on. There is no option to disable it. eslint-plugin-command lets you run one-shot code transforms from comments (for example /// to-function). Config name: vinicunca/command/rules.

To drop it:

eslint.config.js
export default vinicuncaESLint().remove('vinicunca/command/rules');