mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-09 19:49:43 +00:00
Document lint.preview and format.preview (#8032)
Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
2729c4cacd
commit
46d5db56cc
1 changed files with 14 additions and 0 deletions
|
|
@ -10,6 +10,20 @@ Preview mode enables a collection of newer rules and fixes that are considered e
|
|||
Preview mode can be enabled with the `--preview` flag on the CLI or by setting `preview = true` in your Ruff
|
||||
configuration file (e.g. `pyproject.toml`).
|
||||
|
||||
Preview mode can be configured separately for linting and formatting (requires Ruff v0.1.1+). To enable preview lint rules without preview style formatting:
|
||||
|
||||
```toml
|
||||
[lint]
|
||||
preview = true
|
||||
```
|
||||
|
||||
To enable preview style formatting without enabling any preview lint rules:
|
||||
|
||||
```toml
|
||||
[format]
|
||||
preview = true
|
||||
```
|
||||
|
||||
## Using rules that are in preview
|
||||
|
||||
If a rule is marked as preview, it can only be selected if preview mode is enabled. For example, consider a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue