Generate or update an ESLint plugin that exports rule configs compatible with ESLint v8 (eslintrc) and ESLint v9 (flat config).
Stale target. Rules below cover ESLint v8 and v9. v9 reached end-of-life 2026-08-06; v10 has been current since February 2026 and dropped Node < 20.19. Confirm the consumer's ESLint major and check https://eslint.org/docs/latest/extend/plugins for v10 plugin-shape changes before applying anything. Never assume the v9 shapes still hold.
Scope: author or modify an ESLint plugin package exporting rules, configs
(flat and/or legacy), optional processors, and meta (name, version, namespace).
Deliverable is plugin source plus working consumer examples.
| File | Use for |
|---|---|
references/eslint-plugin-configs.md |
Plugin skeleton and config-assignment code |
examples/consumers.md |
Flat and legacy consumer configs for each naming strategy |
| Version | Default | Other mode |
|---|---|---|
| v9 | Flat config | .eslintrc* deprecated; applies only with ESLINT_USE_FLAT_CONFIG=false |
| v8 | .eslintrc* |
Flat opt-in via eslint.config.js or ESLINT_USE_FLAT_CONFIG=true |
PACKAGE_NAME ยท NAMESPACE (rule/config prefix) ยท RULES (ruleId โ implementation) ยท
desired config set (recommended, strict, โฆ).
Single object, ESM default export:
meta โ name, version, namespacerulesconfigsprocessors (optional)meta.namespace is the canonical prefix for rules, configs, and registration. Rule IDs
inside the plugin never contain /. Every rule reference in a config is
"<namespace>/<ruleId>".
| Strategy | When | Keys |
|---|---|---|
| A (default) | New plugin, or you own the public API | Flat flat/<configName> ยท Legacy legacy-<configName> |
| B | Legacy <configName> already published |
Keep <configName> exactly; add flat/<configName> |
Flat (v9 primary) โ array of config objects ยท plugin registered in object form
plugins: { [namespace]: plugin } ยท namespaced rule keys ยท languageOptions optional.
configs["flat/recommended"] โ Array<FlatConfigObject>
Legacy (v8) โ plain eslintrc object ยท plugins: ["<namespace>"] ยท namespaced rule
keys ยท globals/parserOptions optional.
configs["legacy-recommended"] โ EslintrcObject
A config that references the plugin object must not read plugin before it exists:
plugin with configs empty.Object.assign).The flat/ prefix is an export key, never a consumer string.
| Export key | Consumer extends |
|---|---|
configs["flat/recommended"] |
"namespace/recommended" |
configs["legacy-recommended"] |
"namespace/legacy-recommended" |
configs["recommended"] (Strategy B) |
"namespace/recommended" |
Unless the user excludes them, emit both, matching the chosen naming strategy exactly:
eslint.config.js, using defineConfig, registering the plugin, using
extends..eslintrc (JSON/YAML/JS), using plugins + extends.Plus plugin source or diffs, and the validation result below.
flat/<name>legacy-<name>meta.namespace missing โ add it and realign every rule prefixAll must hold before reporting done:
meta.name, meta.version, meta.namespace present; namespace matches every rule prefix