|
12 | 12 | "additionalProperties": false, |
13 | 13 | "properties": { |
14 | 14 | "configuration": { |
15 | | - "type": ["string", "null"], |
16 | 15 | "default": null, |
17 | | - "markdownDescription": "Path to a `ruff.toml` or `pyproject.toml` file to use for configuration. By default, Ruff will discover configuration for each project from the filesystem, mirroring the behavior of the Ruff CLI." |
| 16 | + "markdownDescription": "Configuration overrides for Ruff. See [the documentation](https://docs.astral.sh/ruff/editors/settings/#configuration) for more details.", |
| 17 | + "oneOf": [ |
| 18 | + { |
| 19 | + "type": "string", |
| 20 | + "markdownDescription": "Path to a `ruff.toml` or `pyproject.toml` file to use for configuration.", |
| 21 | + "examples": [ |
| 22 | + "~/.ruff.toml" |
| 23 | + ] |
| 24 | + }, |
| 25 | + { |
| 26 | + "type": "object", |
| 27 | + "markdownDescription": "Inline JSON configuration for Ruff settings (e.g., `{ \"line-length\": 100 }`). *Added in Ruff 0.9.8.*", |
| 28 | + "examples": [ |
| 29 | + { |
| 30 | + "lint": { |
| 31 | + "unfixable": [ |
| 32 | + "F401" |
| 33 | + ] |
| 34 | + }, |
| 35 | + } |
| 36 | + ] |
| 37 | + }, |
| 38 | + { |
| 39 | + "type": "null", |
| 40 | + } |
| 41 | + ], |
18 | 42 | }, |
19 | 43 | "configurationPreference": { |
20 | 44 | "type": "string", |
|
32 | 56 | "markdownDescription": "The strategy to use when resolving settings across editor and the filesystem. By default, editor configuration is prioritized over `ruff.toml` and `pyproject.toml` files." |
33 | 57 | }, |
34 | 58 | "exclude": { |
35 | | - "type": ["array", "null"], |
| 59 | + "type": [ |
| 60 | + "array", |
| 61 | + "null" |
| 62 | + ], |
36 | 63 | "default": null, |
37 | 64 | "items": { |
38 | 65 | "type": "string" |
39 | 66 | }, |
40 | 67 | "description": "A list of file patterns to exclude from linting and formatting. See the documentation for more details." |
41 | 68 | }, |
42 | 69 | "format.preview": { |
43 | | - "type": ["null", "boolean"], |
| 70 | + "type": [ |
| 71 | + "null", |
| 72 | + "boolean" |
| 73 | + ], |
44 | 74 | "default": null, |
45 | 75 | "description": "Whether to enable Ruff's preview mode when formatting." |
46 | 76 | }, |
|
50 | 80 | "markdownDescription": "Whether to enable linting. Set to false to use Ruff exclusively as a formatter." |
51 | 81 | }, |
52 | 82 | "lineLength": { |
53 | | - "type": ["null", "integer"], |
| 83 | + "type": [ |
| 84 | + "null", |
| 85 | + "integer" |
| 86 | + ], |
54 | 87 | "default": null, |
55 | 88 | "description": "The line length to use for the linter and formatter." |
56 | 89 | }, |
57 | 90 | "lint.select": { |
58 | | - "type": ["array", "null"], |
| 91 | + "type": [ |
| 92 | + "array", |
| 93 | + "null" |
| 94 | + ], |
59 | 95 | "default": null, |
60 | 96 | "items": { |
61 | 97 | "type": "string" |
62 | 98 | }, |
63 | 99 | "description": "Rules to enable by default. See the documentation." |
64 | 100 | }, |
65 | 101 | "lint.extendSelect": { |
66 | | - "type": ["array", "null"], |
| 102 | + "type": [ |
| 103 | + "array", |
| 104 | + "null" |
| 105 | + ], |
67 | 106 | "default": null, |
68 | 107 | "items": { |
69 | 108 | "type": "string" |
70 | 109 | }, |
71 | 110 | "markdownDescription": "Rules to enable in addition to those in `lint.select`." |
72 | 111 | }, |
73 | 112 | "lint.ignore": { |
74 | | - "type": ["array", "null"], |
| 113 | + "type": [ |
| 114 | + "array", |
| 115 | + "null" |
| 116 | + ], |
75 | 117 | "default": null, |
76 | 118 | "items": { |
77 | 119 | "type": "string" |
78 | 120 | }, |
79 | 121 | "description": "Rules to disable by default. See the documentation." |
80 | 122 | }, |
81 | 123 | "lint.preview": { |
82 | | - "type": ["null", "boolean"], |
| 124 | + "type": [ |
| 125 | + "null", |
| 126 | + "boolean" |
| 127 | + ], |
83 | 128 | "default": null, |
84 | 129 | "description": "Whether to enable Ruff's preview mode when linting." |
85 | 130 | }, |
|
0 commit comments