Optional configs
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.
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.
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').true. A curated subset (duplicated branches, dead stores, identical expressions, and similar) — not the plugin's full recommended set.15. Pass false to disable sonarjs/cognitive-complexity.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.
export default vinicuncaESLint({
pnpm: {
catalogs: true,
sort: true,
},
});
true when the workspace file mentions catalog: or catalogs:. Enforces catalog usage in package.json.true unless jsonc is false. Lints package.json (pnpm/json-prefer-workspace-settings, pnpm/json-valid-catalog).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).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.
export default vinicuncaESLint({
e18e: {
modernization: true,
performanceImprovements: true,
moduleReplacements: false,
},
});
true.true.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.
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:
export default vinicuncaESLint().remove('vinicunca/command/rules');