Skip to content

Commit

Permalink
docs: Add warning about file extension named processor feature being …
Browse files Browse the repository at this point in the history
…removed by flat config
  • Loading branch information
matwilko committed Jul 13, 2023
1 parent bb30908 commit dda772b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/src/extend/custom-processors.md
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions docs/src/extend/plugins.md
Expand Up @@ -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
Expand Down

0 comments on commit dda772b

Please sign in to comment.