Skip to content

Commit f115f71

Browse files
committedApr 5, 2025·
docs(editor): add readme block for possible configurations (#10243)
1 parent 32b9d1e commit f115f71

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed
 

Diff for: ‎editors/vscode/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ This is the linter for Oxc. The currently supported features are listed below.
2020
- Support for `source.fixAll.oxc` as a code action provider. Configure this in your settings `editor.codeActionsOnSave`
2121
to automatically apply fixes when saving the file.
2222

23+
## Configuration
24+
25+
Following configuration are supported via `settings.json`:
26+
27+
| Key | Default Value | Possible Values | Description |
28+
| ------------------ | ------------- | -------------------------------- | --------------------------------------------------------------------------- |
29+
| `oxc.lint.run` | `onType` | `onSave` \| `onType` | Run the linter on save (onSave) or on type (onType) |
30+
| `oxc.enable` | `true` | `true` \| `false` | Enables the language server to receive lint diagnostics |
31+
| `oxc.trace.server` | `off` | `off` \| `messages` \| `verbose` | races the communication between VS Code and the language server. |
32+
| `oxc.configPath` | `null` | `null`\| `<string>` | Path to ESlint configuration. Keep it empty to enable nested configuration. |
33+
| `oxc.path.server` | - | `<string>` | Path to Oxc language server binary. Mostly for testing the language server. |
34+
| `oxc.flags` | - | `Record<string, string>` | Specific Oxlint flags to pass to the language server. |
35+
36+
### Flags
37+
38+
- `key: disable_nested_config`: Disabled nested configuration and searches only for `configPath`
39+
- `key: fix_kind`: default: `"safe_fix"`, possible values `"safe_fix" | "safe_fix_or_suggestion" | "dangerous_fix" | "dangerous_fix_or_suggestion" | "none" | "all"`
40+
2341
## Testing
2442

2543
Run `pnpm server:build:debug` to build the language server.

Diff for: ‎editors/vscode/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@
106106
"oxc.path.server": {
107107
"type": "string",
108108
"scope": "window",
109-
"description": "Path to Oxc language server binary."
109+
"description": "Path to Oxc language server binary. Mostly for testing the language server."
110110
},
111111
"oxc.flags": {
112112
"type": "object",
113113
"scope": "window",
114114
"default": {},
115-
"description": "Oxc options that would normally be passed when executing on the command line."
115+
"description": "Specific Oxlint flags to pass to the language server."
116116
}
117117
}
118118
},

0 commit comments

Comments
 (0)
Please sign in to comment.