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
closes#11618
VSCode users are now able to set the severity of unused disabled directives via `oxc.unusedDisableDirectives`.
Other Clients can use this options too, by passing `unusedDisableDirectives` as a new config key.

Copy file name to clipboardExpand all lines: crates/oxc_language_server/README.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,12 @@ This crate provides an [LSP](https://microsoft.github.io/language-server-protoco
19
19
20
20
These options can be passed with [initialize](#initialize), [workspace/didChangeConfiguration](#workspace/didChangeConfiguration) and [workspace/configuration](#workspace/configuration).
|`run`|`"onSave" \| "onType"`|`"onType"`| Should the server lint the files when the user is typing or saving |
25
+
|`configPath`|`<string>`\|`null`|`null`| Path to a oxlint configuration file, passing a string will disable nested configuration |
26
+
|`unusedDisableDirectives`|`"allow" \| "warn"`\| "deny"` |`"allow"`| Define how directive comments like `// oxlint-disable-line` should be reported, when no errors would have been reported on that line anyway |
27
+
|`flags`|`Map<string, string>`|`<empty>`| Special oxc language server flags, currently only one flag key is supported: `disable_nested_config`|
27
28
28
29
## Supported LSP Specifications from Server
29
30
@@ -39,6 +40,7 @@ The client can pass the workspace options like following:
39
40
"options": {
40
41
"run": "onType",
41
42
"configPath": null,
43
+
"unusedDisableDirectives": "allow",
42
44
"flags": {}
43
45
}
44
46
}]
@@ -72,6 +74,7 @@ The client can pass the workspace options like following:
72
74
"options": {
73
75
"run": "onType",
74
76
"configPath": null,
77
+
"unusedDisableDirectives": "allow",
75
78
"flags": {}
76
79
}
77
80
}]
@@ -155,11 +158,10 @@ Only will be requested when the `ClientCapabilities` has `workspace.configuratio
|`oxc.lint.run`|`onType`|`onSave`\|`onType`| Run the linter on save (onSave) or on type (onType) |
43
+
|`oxc.configPath`|`null`|`null`\|`<string>`| Path to ESlint configuration. Keep it empty to enable nested configuration. |
44
+
|`oxc.unusedDisableDirectives`|`allow`|`allow`\|`warn`\|`deny`| Define how directive comments like `// oxlint-disable-line` should be reported, when no errors would have been reported on that line anyway. |
45
+
|`oxc.flags`| - |`Record<string, string>`| Custom flags passed to the language server. |
Copy file name to clipboardExpand all lines: editors/vscode/package.json
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,22 @@
110
110
"default": null,
111
111
"description": "Path to ESlint configuration. Keep it empty to enable nested configuration."
112
112
},
113
+
"oxc.unusedDisableDirectives": {
114
+
"type": "string",
115
+
"scope": "resource",
116
+
"enum": [
117
+
"allow",
118
+
"warn",
119
+
"deny"
120
+
],
121
+
"enumDescriptions": [
122
+
"Allow",
123
+
"Warn",
124
+
"Deny"
125
+
],
126
+
"default": "allow",
127
+
"description": "Define how directive comments like `// oxlint-disable-line` should be reported, when no errors would have been reported on that line anyway."
0 commit comments