Skip to content

Commit 46d5db5

Browse files
MichaReiserzanieb
andauthored
Document lint.preview and format.preview (#8032)
Co-authored-by: Zanie Blue <[email protected]>
1 parent 2729c4c commit 46d5db5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/preview.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ Preview mode enables a collection of newer rules and fixes that are considered e
1010
Preview mode can be enabled with the `--preview` flag on the CLI or by setting `preview = true` in your Ruff
1111
configuration file (e.g. `pyproject.toml`).
1212

13+
Preview mode can be configured separately for linting and formatting (requires Ruff v0.1.1+). To enable preview lint rules without preview style formatting:
14+
15+
```toml
16+
[lint]
17+
preview = true
18+
```
19+
20+
To enable preview style formatting without enabling any preview lint rules:
21+
22+
```toml
23+
[format]
24+
preview = true
25+
```
26+
1327
## Using rules that are in preview
1428

1529
If a rule is marked as preview, it can only be selected if preview mode is enabled. For example, consider a

0 commit comments

Comments
 (0)