-
Notifications
You must be signed in to change notification settings - Fork 8
/
package.json
executable file
·369 lines (369 loc) · 11 KB
/
package.json
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
{
"name": "phpstan-vscode",
"displayName": "phpstan",
"description": "PHPStan inline error provider",
"version": "3.2.17",
"engines": {
"vscode": "^1.64.0",
"node": ">=14.16.0"
},
"license": "MIT",
"categories": [
"Linters"
],
"icon": "static/images/phpstan.png",
"repository": {
"type": "git",
"url": "https://github.com/SanderRonde/phpstan-vscode"
},
"homepage": "https://github.com/SanderRonde/phpstan-vscode/blob/main/README.md",
"bugs": {
"url": "https://github.com/SanderRonde/phpstan-vscode/issues",
"email": "[email protected]"
},
"publisher": "SanderRonde",
"activationEvents": [
"onLanguage:php"
],
"main": "./out/extension.js",
"contributes": {
"configuration": {
"type": "object",
"title": "PHPStan",
"properties": {
"phpstan.singleFileMode": {
"type": "boolean",
"description": "Whether to scan only the file that is being saved, instead of the whole project. This is not recommended since it busts the cache. Only use this if your computer can't handle a full-project scan",
"default": false
},
"phpstan.binPath": {
"type": "string",
"default": "vendor/bin/phpstan",
"description": "Path to the PHPStan binary"
},
"phpstan.binCommand": {
"type": "array",
"examples": [
[
"phpstan"
],
[
"lando",
"phpstan"
]
],
"items": {
"type": "string"
},
"description": "PHPStan command. Use this instead of \"binPath\" if, for example, the phpstan binary is in your path"
},
"phpstan.configFile": {
"type": "string",
"default": "phpstan.neon,phpstan.neon.dist,phpstan.dist.neon",
"examples": [
"phpstan.neon",
"backend/phpstan.neon",
"phpstan.neon,phpstan.neon.dist"
],
"description": "Path to the config file (use a comma-separated list to resolve in order)"
},
"phpstan.paths": {
"type": "object",
"default": {},
"examples": [
{
"/path/to/hostFolder": "/path/in/dockerContainer"
}
],
"description": "Path mapping for scanned files. Allows for rewriting paths for for example Docker."
},
"phpstan.dockerContainerName": {
"type": "string",
"description": "Name of the Docker container to use for scanning",
"examples": [
"docker-phpstan-php-1"
]
},
"phpstan.rootDir": {
"type": "string",
"description": "Path to the root directory"
},
"phpstan.options": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Extra commandline options to be passed to PHPStan. Supports substituting ${workspaceFolder}"
},
"phpstan.enableStatusBar": {
"type": "boolean",
"default": true,
"description": "Show the status bar while scanning"
},
"phpstan.memoryLimit": {
"type": "string",
"default": "1G",
"description": "Memory limit to use"
},
"phpstan.enabled": {
"type": "boolean",
"description": "Whether to enable the on-save checker",
"default": true
},
"phpstan.projectTimeout": {
"type": "number",
"description": "Timeout in milliseconds for a full project check. After this time the checking process is canceled",
"default": 300000
},
"phpstan.timeout": {
"type": "number",
"description": "Timeout in milliseconds for a file check. After this time the checking process is canceled",
"default": 300000
},
"phpstan.suppressTimeoutMessage": {
"type": "boolean",
"description": "Stop showing an error when the operation times out",
"default": false
},
"phpstan.showProgress": {
"type": "boolean",
"description": "Show the progress bar when performing a single-file check",
"default": false
},
"phpstan.showTypeOnHover": {
"type": "boolean",
"description": "Show type information on hover. Disable this if you have a custom PHPStan binary that runs on another filesystem (such as Docker) or if you run into caching problems. Does not work with PHPStan Pro enabled or for PHPStan version < 1.8.0.",
"default": false
},
"phpstan.enableLanguageServer": {
"type": "boolean",
"description": "Enable language server that provides on-hover type information. Disable this if you have a custom PHPStan binary that runs on another filesystem (such as Docker) or if you run into caching problems. Does not work with PHPStan Pro enabled or for PHPStan version < 1.8.0.",
"default": false,
"deprecationMessage": "Use phpstan.showTypeOnHover instead"
},
"phpstan.ignoreErrors": {
"type": "array",
"description": "An array of regular expressions to ignore in PHPStan's error output. If PHPStan outputs some warnings/errors in stderr that can be ignored, put them in here and they'll no longer cause the process to exit with an error.",
"default": [
"Xdebug: .*"
],
"items": {
"type": "string"
},
"examples": [
[
"Xdebug: .*"
]
]
},
"phpstan.suppressWorkspaceMessage": {
"type": "boolean",
"description": "Stop showing an error when using a multi-workspace project",
"default": false
},
"phpstan.pro": {
"type": "boolean",
"description": "Use PHPStan Pro under the hood (if you have a license)",
"default": false
},
"phpstan.tmpDir": {
"type": "string",
"description": "Path to the PHPStan TMP directory. Lets PHPStan determine the TMP directory if not set."
},
"phpstan.checkValidity": {
"type": "boolean",
"description": "Check the validity of the PHP code before checking it with PHPStan. This is recommended only if you have autoSave enabled or for some other reason save syntactically invalid code. PHPStan tends to invalidate its cache when checking an invalid file, leading to a slower experience.",
"default": false
}
}
},
"commands": [
{
"command": "phpstan.scanFileForErrors",
"title": "Scan current file for errors"
},
{
"command": "phpstan.scanProjectForErrors",
"title": "Scan project for errors"
},
{
"command": "phpstan.reload",
"title": "Reload language server"
},
{
"command": "phpstan.nextError",
"title": "Go to next error"
},
{
"command": "phpstan.previousError",
"title": "Go to previous error"
},
{
"command": "phpstan.openPhpstanPro",
"title": "Open PHPStan Pro in browser"
},
{
"command": "phpstan.launchSetup",
"title": "Launch setup"
},
{
"command": "cmd.phpstan.scanFileForErrors",
"title": "PHPStan: Scan current file for errors"
},
{
"command": "cmd.phpstan.scanProjectForErrors",
"title": "PHPStan: Scan project for errors"
},
{
"command": "cmd.phpstan.reload",
"title": "PHPStan: Reload language server"
},
{
"command": "cmd.phpstan.nextError",
"title": "PHPStan: Go to next error"
},
{
"command": "cmd.phpstan.previousError",
"title": "PHPStan: Go to previous error"
},
{
"command": "cmd.phpstan.openPhpstanPro",
"title": "PHPStan: Open PHPStan Pro in browser"
},
{
"command": "cmd.phpstan.launchSetup",
"title": "PHPStan: Launch setup"
}
],
"menus": {
"commandPalette": [
{
"command": "phpstan.scanFileForErrors",
"when": "false"
},
{
"command": "phpstan.scanProjectForErrors",
"when": "false"
},
{
"command": "phpstan.reload",
"when": "false"
},
{
"command": "phpstan.nextError",
"when": "false"
},
{
"command": "phpstan.previousError",
"when": "false"
},
{
"command": "phpstan.openPhpstanPro",
"when": "false"
},
{
"command": "phpstan.launchSetup",
"when": "false"
},
{
"command": "cmd.phpstan.scanFileForErrors",
"when": "true"
},
{
"command": "cmd.phpstan.scanProjectForErrors",
"when": "true"
},
{
"command": "cmd.phpstan.reload",
"when": "true"
},
{
"command": "cmd.phpstan.nextError",
"when": "true"
},
{
"command": "cmd.phpstan.previousError",
"when": "true"
},
{
"command": "cmd.phpstan.openPhpstanPro",
"when": "true"
},
{
"command": "cmd.phpstan.launchSetup",
"when": "true"
}
]
},
"keybindings": []
},
"watch": {
"build-debug": {
"patterns": [
"client",
"server"
],
"extensions": "ts"
}
},
"scripts": {
"prepack": "bun run generate-package && bun run prettier --check client server && bun run lint && bun run compile && bun run build",
"vscode:prepublish": "bun run prepack",
"compile": "tsc",
"watch": "tsc --watch",
"build": "rimraf ./out && (bun run build:$VARIANT || bun run build:main)",
"build:": "bun run build:main",
"build:debug": "bun run build-debug:main",
"build:main": "bun run --cwd server build && bun run --cwd client build",
"build-debug": "rimraf ./out && bun run build-debug:main",
"build-debug:main": "bun run --cwd server build-debug && bun run --cwd client build-debug",
"build-debug:attach-server": "rimraf ./out && bun run --cwd server build-debug:attac-server && bun run --cwd client build-debug",
"lint": "eslint client server --ext ts",
"format-staged": "(git diff --ignore-submodules --quiet && bun run format) || pretty-quick client server",
"format": "prettier --write client server",
"package": "bun run vsce package --no-yarn",
"package-dev": "VARIANT=\"debug\" bun run vsce package",
"generate-package": "generate-package-json generate --input shared/commands/defs.ts -w -p package.json --handler client/src/lib/commands.ts --validate --name PHPStan --prefix PHPStan && prettier --write package.json",
"prepush": "bun run generate-package && bun run format-staged && bun run lint --fix && bun run compile",
"devBun": "bun install && bun install --cwd client && bun install --cwd server",
"postinstall": "bun install --cwd client && bun install --cwd server",
"dev": "bun run devBun && cd test/demo && composer install && cd ../../php && composer install && cd vendor/phpstan && git clone https://github.com/phpstan/phpstan-src"
},
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.18",
"@types/ps-node": "^0.1.3",
"@types/ps-tree": "^1.1.6",
"@types/rimraf": "^3",
"@types/vscode": "1.64.0",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "latest",
"esbuild": "^0.20.2",
"eslint": "8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "latest",
"eslint-plugin-unused-imports": "^2.0.0",
"gts": "^3.1.0",
"mocha": "latest",
"prettier": "latest",
"prettier-plugin-sort-imports": "^1.8.5",
"pretty-quick": "^4.0.0",
"rimraf": "latest",
"ts-loader": "latest",
"tsx": "latest",
"typescript": "latest",
"vsce": "2.15.0",
"vscode-generate-package-json": "^1.2.0",
"vscode-languageclient": "^8.0.1",
"vscode-test": "^1.6.1"
},
"dependencies": {
"@vscode/extension-telemetry": "^0.9.7",
"chokidar": "^3.6.0",
"ps-node": "^0.1.6",
"ps-tree": "^1.2.0",
"tmp-promise": "^3.0.3"
}
}