You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/preview.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,20 @@ Preview mode enables a collection of newer rules and fixes that are considered e
10
10
Preview mode can be enabled with the `--preview` flag on the CLI or by setting `preview = true` in your Ruff
11
11
configuration file (e.g. `pyproject.toml`).
12
12
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
+
13
27
## Using rules that are in preview
14
28
15
29
If a rule is marked as preview, it can only be selected if preview mode is enabled. For example, consider a
0 commit comments