Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for processors #6479

Merged
merged 1 commit into from Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hot-gifts-compete.md
@@ -0,0 +1,5 @@
---
"stylelint": major
---

Removed: support for processors
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -70,7 +70,6 @@ There are also rules for enforcing stylistic conventions, but we now recommend y
- [Writing custom syntaxes](docs/developer-guide/syntaxes.md)
- [Writing custom formatters](docs/developer-guide/formatters.md)
- [Writing system tests](docs/developer-guide/system-tests.md)
- [Writing processors](docs/developer-guide/processors.md)
- Migration guide
- [Migrating to 14.0.0](docs/migration-guide/to-14.md)
- Maintainer guide
Expand Down
28 changes: 0 additions & 28 deletions docs/developer-guide/processors.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/migration-guide/to-15.md
@@ -1,5 +1,9 @@
# Migrating to 15.0.0

## Remove support for processors

We removed the support for processors. Instead, please use [custom syntaxes](../developer-guide/syntaxes.md).

## Change of `overrides.extends` behavior

We changed the `overrides.extends` behavior to merge rather than replace, to make it consistent with the `overrides.plugins`.
Expand Down
29 changes: 0 additions & 29 deletions docs/user-guide/configure.md
Expand Up @@ -388,35 +388,6 @@ If the globs are absolute paths, they are used as is. If they are relative, they

_Note that this is not an efficient method for ignoring lots of files._ If you want to ignore a lot of files efficiently, use [`.stylelintignore`](ignore-code.md) or adjust your files globs.

## `processors`

Processors are functions built by the community that hook into Stylelint's pipeline, modifying code on its way into Stylelint and modifying results on their way out.

**We discourage their use in favor of using the [`customSyntax` option](#customsyntax) as processors are incompatible with the [autofix feature](usage/options.md#fix).**

To use one, add a `"processors"` array to your config, containing "locaters" identifying the processors you want to use. As with `extends`, above, a "locater" can be either an npm module name, an absolute path, or a path relative to the invoking configuration file.

```json
{
"processors": ["stylelint-my-processor"],
"rules": {}
}
```

If your processor has options, make that item an array whose first item is the "locator" and second item is the options object.

```json
{
"processors": [
"stylelint-my-processor",
["some-other-processor", { "optionOne": true, "optionTwo": false }]
],
"rules": {}
}
```

Processors can also only be used with the CLI and the Node.js API, not with the PostCSS plugin. (The PostCSS plugin ignores them.)

## `report*`

These `report*` properties provide extra validation for `stylelint-disable` comments. This can be helpful for enforcing useful and well-documented disables.
Expand Down
234 changes: 0 additions & 234 deletions lib/__tests__/processors.test.js

This file was deleted.