Replies: 2 comments
|
Yes. Use the scoped preview settings, not the top-level preview setting. Ruff’s current preview docs show that preview can be configured separately for linting and formatting. For [tool.ruff.lint]
preview = trueThen leave [tool.ruff.format]
preview = falseThe same idea applies on the CLI: ruff check --preview
ruff formatWhat you probably do not want is this: [tool.ruff]
preview = trueThat top-level option enables preview mode globally, so it can affect both linting and formatting. The scoped If that matches what you were looking for, please mark this as answered so others looking for split lint/format preview config can find it quickly. |
|
You can decouple them. The top-level [tool.ruff.lint]
preview = true
[tool.ruff.format]
preview = falseWith that, preview lint rules are active while the formatter stays on stable behavior. |
Uh oh!
There was an error while loading. Please reload this page.
I'm ok with current non-preview standard of formatting, but I want to use new preview checker rules and human-style usercodes.
Why preview modes for checker and formatter are now (from 0.15x) linked together, is there some deep reasons?
All reactions