Skip to content

Commit

Permalink
docs: File extension named processor deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
matwilko committed Jul 17, 2023
1 parent 7e9be4b commit dee2c45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/extend/custom-processors.md
Expand Up @@ -139,6 +139,12 @@ See [Specify a Processor](../use/configure/plugins#specify-a-processor) in the P

## File Extension-named Processor

::: warning
This feature is deprecated and only works in eslintrc-style configuration files. Flat config files do not automatically apply processors; you need to explicitly set the `processor` property.

**From ESLint v9.0.0+, this feature will be removed.**
:::

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
6 changes: 6 additions & 0 deletions docs/src/extend/plugins.md
Expand Up @@ -89,6 +89,12 @@ Plugin environments can define the following objects:

### Processors in Plugins

::: warning
File Extension-named Processors are deprecated and only work in eslintrc-style configuration files. Flat config files do not automatically apply processors; you need to explicitly set the `processor` property.

**From ESLint v9.0.0+, File Extension-named Processors will be removed.**
:::

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 dee2c45

Please sign in to comment.