forked from oxc-project/oxc-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
375 lines (375 loc) · 12.7 KB
/
package.json
File metadata and controls
375 lines (375 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
{
"name": "oxc-vscode",
"displayName": "Oxc",
"version": "1.50.0",
"description": "Oxlint and Oxfmt editor integration",
"categories": [
"Formatters",
"Linters"
],
"keywords": [
"formatter",
"linter",
"oxc",
"oxfmt",
"oxlint"
],
"bugs": {
"url": "https://github.com/oxc-project/oxc-vscode/issues"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/oxc-project/oxc-vscode.git"
},
"sponsor": {
"url": "https://github.com/sponsors/boshen"
},
"publisher": "oxc",
"main": "./out/main.js",
"scripts": {
"preinstall": "[ -f icon.png ] || curl https://cdn.jsdelivr.net/gh/oxc-project/oxc-assets/black-bg-circle.png --output icon.png",
"build": "pnpm run compile && pnpm run package",
"compile": "rolldown -c rolldown.config.ts",
"watch": "pnpm run compile --watch",
"package": "vsce package --no-dependencies -o oxc_language_server.vsix",
"package:pre-release": "vsce package --no-dependencies --pre-release -o oxc_language_server.vsix",
"install-extension": "code --install-extension oxc_language_server.vsix --force",
"test": "cross-env TEST=true pnpm run compile && vscode-test",
"test:unit": "cross-env TEST=true pnpm run compile && cross-env TEST_SUITE=unit vscode-test",
"test:oxlint": "cross-env TEST=true pnpm run compile && cross-env TEST_SUITE=oxlint-lsp vscode-test",
"test:oxlint-js": "cross-env TEST=true pnpm run compile && cross-env TEST_SUITE=oxlint-js vscode-test",
"test:oxlint-multi-root": "cross-env TEST=true pnpm run compile && cross-env TEST_SUITE=oxlint-lsp-multi-root vscode-test",
"test:oxfmt": "cross-env TEST=true pnpm run compile && cross-env TEST_SUITE=oxfmt-lsp vscode-test",
"lint": "oxlint -c oxlint.config.json",
"fmt": "oxfmt --write -c oxfmt.config.json",
"fmt:check": "oxfmt --check -c oxfmt.config.json",
"docs:update": "node scripts/vscode_docs.ts update && pnpm run fmt"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
},
"devDependencies": {
"@types/mocha": "^10.0.9",
"@types/node": "24.1.0",
"@types/vscode": "1.93.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^3.0.0",
"cross-env": "^10.1.0",
"ovsx": "^0.10.0",
"oxfmt": "latest",
"oxlint": "latest",
"oxlint-tsgolint": "^0.17.0",
"rolldown": "1.0.0-rc.10",
"tinyglobby": "^0.2.15"
},
"contributes": {
"commands": [
{
"command": "oxc.restartServer",
"title": "Restart oxlint Server",
"category": "Oxc"
},
{
"command": "oxc.restartServerFormatter",
"title": "Restart oxfmt Server",
"category": "Oxc"
},
{
"command": "oxc.toggleEnable",
"title": "Toggle whether oxlint is enabled",
"category": "Oxc"
},
{
"command": "oxc.toggleEnableFormatter",
"title": "Toggle whether oxfmt is enabled",
"category": "Oxc"
},
{
"command": "oxc.showOutputChannel",
"title": "Show Output Channel (Linter)",
"category": "Oxc"
},
{
"command": "oxc.showOutputChannelFormatter",
"title": "Show Output Channel (Formatter)",
"category": "Oxc"
},
{
"command": "oxc.applyAllFixesFile",
"title": "Fix all auto-fixable problems (file)",
"category": "Oxc"
}
],
"configuration": {
"type": "object",
"title": "oxc",
"properties": {
"oxc.lint.run": {
"scope": "resource",
"type": "string",
"enum": [
"onSave",
"onType"
],
"default": "onType",
"markdownDescription": "Run the linter on save (onSave) or on type (onType)"
},
"oxc.enable": {
"type": [
"boolean",
"null"
],
"default": null,
"scope": "window",
"markdownDescription": "This is a master toggle for both `oxc.enable.oxlint` and `oxc.enable.oxfmt`."
},
"oxc.enable.oxlint": {
"type": "boolean",
"default": true,
"scope": "window",
"markdownDescription": "Enable oxlint (linter). Falls back to `oxc.enable` if not set."
},
"oxc.enable.oxfmt": {
"type": "boolean",
"default": true,
"scope": "window",
"markdownDescription": "Enable oxfmt (formatter). Falls back to `oxc.enable` if not set."
},
"oxc.requireConfig": {
"scope": "resource",
"type": "boolean",
"default": false,
"markdownDescription": "Start the language server only when a `.oxlintrc.json(c)` or `oxlint.config.ts` file exists in one of the workspaces."
},
"oxc.trace.server": {
"type": "string",
"scope": "window",
"enum": [
"off",
"messages",
"verbose"
],
"markdownEnumDescriptions": [
"No traces",
"Error only",
"Full log"
],
"default": "off",
"markdownDescription": "Traces the communication between VS Code and the language server."
},
"oxc.configPath": {
"type": [
"string",
"null"
],
"scope": "resource",
"default": null,
"markdownDescription": "Path to oxlint configuration. Keep it empty to enable nested configuration."
},
"oxc.tsConfigPath": {
"type": [
"string",
"null"
],
"scope": "resource",
"default": null,
"markdownDescription": "Path to the project's TypeScript config file. \n\nIf your `tsconfig.json` is not at the root, you will need this set for the `import` plugin rules to resolve imports correctly."
},
"oxc.unusedDisableDirectives": {
"type": [
"string",
"null"
],
"scope": "resource",
"enum": [
"allow",
"warn",
"deny"
],
"markdownEnumDescriptions": [
"Allow all `oxlint-disable` and `eslint-disable` directives, even if they do nothing.",
"Warn about `oxlint-disable` and `eslint-disable` directives that do nothing.",
"Error on `oxlint-disable` and `eslint-disable` directives that do nothing."
],
"default": null,
"markdownDescription": "Define how directive comments like `// oxlint-disable-line` should be reported, when no errors would have been reported on that line anyway. It is preferred to use `options.reportUnusedDisableDirectives` in your configuration file"
},
"oxc.typeAware": {
"type": [
"boolean",
"null"
],
"scope": "resource",
"default": null,
"markdownDescription": "Forces type-aware linting. Requires the `oxlint-tsgolint` package. It is preferred to use `options.typeAware` in your configuration file"
},
"oxc.disableNestedConfig": {
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Disable searching for nested configuration files. When set to true, only the configuration file specified in `oxc.configPath` (if any) will be used."
},
"oxc.fixKind": {
"type": "string",
"scope": "resource",
"enum": [
"safe_fix",
"safe_fix_or_suggestion",
"dangerous_fix",
"dangerous_fix_or_suggestion",
"none",
"all"
],
"markdownEnumDescriptions": [
"Only safe fixes will be applied",
"Safe fixes or suggestions will be applied",
"Safe and dangerous fixes will be applied",
"Safe and dangerous fixes or suggestions will be applied",
"No fixes will be applied",
"All fixes and suggestions will be applied"
],
"default": "safe_fix",
"markdownDescription": "Specify the kind of fixes to suggest/apply."
},
"oxc.flags": {
"type": "object",
"scope": "resource",
"default": {},
"markdownDescription": "Specific Oxlint flags to pass to the language server.",
"deprecated": true,
"markdownDeprecationMessage": "deprecated since 1.25.0, use `oxc.fixKind` or `oxc.disableNestedConfig` instead."
},
"oxc.fmt.experimental": {
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable Oxfmt formatting support.",
"deprecated": true,
"markdownDeprecationMessage": "The formatter is now stable, this setting has no effect."
},
"oxc.fmt.configPath": {
"type": [
"string",
"null"
],
"scope": "resource",
"default": null,
"markdownDescription": "Path to an oxfmt configuration file"
},
"oxc.suppressProgramErrors": {
"type": "boolean",
"scope": "window",
"default": false,
"markdownDescription": "Suppress tsconfig errors from tsgolint and still lint files under partially-valid tsconfig projects. When enabled, sets `OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true`. **Note:** Type-aware lint rules may produce degraded results when the tsconfig is broken."
},
"oxc.path.server": {
"type": "string",
"scope": "window",
"markdownDescription": "Path to Oxc language server binary. Mostly for testing the language server.",
"deprecated": true,
"markdownDeprecationMessage": "Use `oxc.path.oxlint` instead, targeting the `oxlint` binary."
},
"oxc.path.oxlint": {
"type": "string",
"scope": "window",
"markdownDescription": "Path to an Oxc linter binary. Default: auto detection in `node_modules`."
},
"oxc.path.oxfmt": {
"type": "string",
"scope": "window",
"markdownDescription": "Path to an Oxc formatter binary. Default: auto detection in `node_modules`."
},
"oxc.path.tsgolint": {
"type": "string",
"scope": "window",
"markdownDescription": "Path to an Oxc tsgolint binary. Default: auto detection from `oxlint`."
},
"oxc.path.node": {
"type": "string",
"scope": "window",
"markdownDescription": "Path to a Node.js binary. Will be added to the `oxfmt` and `oxlint` `PATH` environment."
},
"oxc.useExecPath": {
"type": "boolean",
"scope": "window",
"default": false,
"markdownDescription": "Whether to use the extension's execPath (Electron's bundled Node.js) as the JavaScript runtime for running Oxc tools, instead of looking for a system Node.js installation."
}
}
},
"jsonValidation": [
{
"fileMatch": [
".oxlintrc.json",
".oxlintrc.jsonc"
],
"url": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json"
},
{
"fileMatch": [
".oxfmtrc.json",
".oxfmtrc.jsonc"
],
"url": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxfmt/configuration_schema.json"
}
],
"languages": [
{
"id": "jsonc",
"filenames": [
".oxlintrc.json",
".oxlintrc.jsonc",
".oxfmtrc.json",
".oxfmtrc.jsonc"
]
}
]
},
"activationEvents": [
"onLanguage:astro",
"onLanguage:css",
"onLanguage:graphql",
"onLanguage:handlebars",
"onLanguage:html",
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:json",
"onLanguage:json5",
"onLanguage:jsonc",
"onLanguage:less",
"onLanguage:markdown",
"onLanguage:mdx",
"onLanguage:mjml",
"onLanguage:scss",
"onLanguage:svelte",
"onLanguage:toml",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:vue",
"onLanguage:yaml"
],
"icon": "icon.png",
"engines": {
"vscode": "^1.93.0"
},
"packageManager": "pnpm@10.30.2",
"capabilities": {
"untrustedWorkspaces": {
"supported": "limited",
"description": "The Extension will always use the Language Server shipped with the Extension.",
"restrictedConfigurations": [
"oxc.path.server",
"oxc.path.oxlint",
"oxc.path.oxfmt",
"oxc.path.tsgolint",
"oxc.path.node",
"oxc.useExecPath"
]
}
},
"vsce": {
"dependencies": false
}
}