Skip to content

Commit 0f0385f

Browse files
docs: use consistent naming recommendation (#20250)
* docs: use consistent naming recommendation * feat: apply suggestions Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> --------- Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
1 parent a3b1456 commit 0f0385f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/extend/plugin-migration-flat-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ If your plugin needs to work with both the old and new configuration systems, th
314314

315315
1. **Export a CommonJS entrypoint.** The old configuration system cannot load plugins that are published only in ESM format. If your source code is in ESM, then you'll need to use a bundler that can generate a CommonJS version and use the [`exports`](https://nodejs.org/api/packages.html#package-entry-points) key in your `package.json` file to ensure the CommonJS version can be found by Node.js.
316316
1. **Keep the `environments` key.** If your plugin exports custom environments, you should keep those as they are and also export the equivalent flat configs as described above. The `environments` key is ignored when ESLint is running in flat config mode.
317-
1. **Export both eslintrc and flat configs.** The `configs` key is only validated when a config is used, so you can provide both formats of configs in the `configs` key. We recommend that you append older format configs with `-legacy` to make it clear that these configs will not be supported in the future. For example, if your primary config is called `recommended` and is in flat config format, then you can also have a config named `recommended-legacy` that is the eslintrc config format.
317+
1. **Export both eslintrc and flat configs.** The `configs` key is only validated when a config is used, so you can provide both formats of configs in the `configs` key. We recommend prefixing older format configs with `legacy-`. For example, if your primary config is called `recommended` and is in flat config format, then you can also have a config named `legacy-recommended` that is the eslintrc config format. If you don’t want to update the config name, you can also create an additional entry in the configs object prefixed with `"flat/"` (for example, `"flat/recommended"`). See [Backwards Compatibility for Legacy Configs](plugins#backwards-compatibility-for-legacy-configs) for more details.
318318

319319
## Further Reading
320320

0 commit comments

Comments
 (0)