mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Introduce tab-size
to correcly calculate the line length with tabulations (#4167)
This commit is contained in:
parent
3644695bf2
commit
c6a760e298
45 changed files with 1005 additions and 173 deletions
|
@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
|
|||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use ruff::directives;
|
||||
use ruff::line_width::{LineLength, TabSize};
|
||||
use ruff::linter::{check_path, LinterResult};
|
||||
use ruff::registry::AsRule;
|
||||
use ruff::rules::{
|
||||
|
@ -102,7 +103,8 @@ pub fn defaultSettings() -> Result<JsValue, JsValue> {
|
|||
extend_unfixable: Some(Vec::default()),
|
||||
external: Some(Vec::default()),
|
||||
ignore: Some(Vec::default()),
|
||||
line_length: Some(defaults::LINE_LENGTH),
|
||||
line_length: Some(LineLength::default()),
|
||||
tab_size: Some(TabSize::default()),
|
||||
select: Some(defaults::PREFIXES.to_vec()),
|
||||
target_version: Some(defaults::TARGET_VERSION),
|
||||
// Ignore a bunch of options that don't make sense in a single-file editor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue