From dda772bb3e82b0b5601e1f03e95278d9f7eec283 Mon Sep 17 00:00:00 2001 From: Matt Wilkinson Date: Thu, 13 Jul 2023 12:07:08 +0100 Subject: [PATCH] docs: Add warning about file extension named processor feature being removed by flat config --- docs/src/extend/custom-processors.md | 10 ++++++++++ docs/src/extend/plugins.md | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/docs/src/extend/custom-processors.md b/docs/src/extend/custom-processors.md index 697d052e6556..62453a8fcb5f 100644 --- a/docs/src/extend/custom-processors.md +++ b/docs/src/extend/custom-processors.md @@ -139,6 +139,16 @@ See [Specify a Processor](../use/configure/plugins#specify-a-processor) in the P ## File Extension-named Processor +::: warning +With the introduction of [flat configuration](../use/configure/configuration-files-new.md), this feature is being removed. If you are updating your plugin to provide flat configs, you **must** specify all processors explicitly in those configs. + +In ESLint v8.0.0+, if a user is still using the old configuration style, processors with file extension names will continue to be automatically included. Users who have switched to using flat configuration may need to manually add these processors to their configuration. + +**From ESLint v9.0.0+, when flat configuration becomes required, this feature will be completely removed.** + +This feature will continue to be available via `FlatCompat` in [`@eslint/eslintrc`](https://www.npmjs.com/package/@eslint/eslintrc), but there is no intention to continue support for it. +::: + If a custom processor name starts with `.`, ESLint handles the processor as a **file extension-named processor**. ESLint applies the processor to files with that filename extension automatically. Users don't need to specify the file extension-named processors in their config files. For example: diff --git a/docs/src/extend/plugins.md b/docs/src/extend/plugins.md index 70bc3ee7c746..f96eae239abd 100644 --- a/docs/src/extend/plugins.md +++ b/docs/src/extend/plugins.md @@ -89,6 +89,10 @@ Plugin environments can define the following objects: ### Processors in Plugins +::: warning +With the introduction of [flat configuration](../use/configure/configuration-files-new.md), there is a breaking change with the removal of file-extension named processor handling. If you are updating your plugin to provide flat configs, you **must** specify all processors explicitly in those configs. See [Custom Processors](./custom-processors.md#file-extension-named-processor) for more. +::: + You can add processors to plugins by including the processor functions in the `processors` key. For more information on defining custom processors, refer to [Custom Processors](custom-processors). ```js