forked from SanderRonde/phpstan-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
executable file
·260 lines (260 loc) · 7.57 KB
/
package.json
File metadata and controls
executable file
·260 lines (260 loc) · 7.57 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
{
"name": "phpstan-vscode",
"displayName": "phpstan",
"description": "PHPStan language server and inline error provider",
"version": "2.2.24",
"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": "awsdfgvhbjn@gmail.com"
},
"publisher": "SanderRonde",
"activationEvents": [
"onLanguage:php"
],
"main": "./out/extension.js",
"contributes": {
"configuration": {
"type": "object",
"title": "PHPStan",
"properties": {
"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",
"examples": [
"phpstan.neon",
"backend/phpstan.neon",
"phpstan.neon,phpstan.neon.dist"
],
"description": "Path to the config file (leave empty to disable, 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 SSH or Docker."
},
"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.timeout": {
"type": "number",
"description": "Timeout in milliseconds for a single file check. After this time the checking process is canceled",
"default": 10000
},
"phpstan.projectTimeout": {
"type": "number",
"description": "Timeout in milliseconds for a full project check. After this time the checking process is canceled",
"default": 60000
},
"phpstan.suppressTimeoutMessage": {
"type": "boolean",
"description": "Stop showing an error when the operation times out",
"default": false
},
"phpstan.showProgress": {
"type": "boolean",
"description": "Stop showing an error when the operation times out",
"default": false
},
"phpstan.enableLanguageServer": {
"type": "boolean",
"description": "Enable language server that provides on-hover information. Disable this if you have a custom PHPStan binary that runs on another filesystem (such as Docker)",
"default": true
},
"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": [],
"items": {
"type": "string"
},
"examples": [
[
"Xdebug: .*"
]
]
}
}
},
"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": "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"
}
],
"menus": {
"commandPalette": [
{
"command": "phpstan.scanFileForErrors",
"when": "false"
},
{
"command": "phpstan.scanProjectForErrors",
"when": "false"
},
{
"command": "phpstan.reload",
"when": "false"
},
{
"command": "cmd.phpstan.scanFileForErrors",
"when": "true"
},
{
"command": "cmd.phpstan.scanProjectForErrors",
"when": "true"
},
{
"command": "cmd.phpstan.reload",
"when": "true"
}
]
},
"keybindings": []
},
"watch": {
"build-debug": {
"patterns": [
"client",
"server"
],
"extensions": "ts"
}
},
"scripts": {
"prepack": "yarn generate-package && yarn prettier --check client server && yarn lint && yarn compile && yarn run build",
"vscode:prepublish": "yarn run prepack",
"compile": "tsc",
"watch": "tsc --watch",
"build": "rimraf ./out && yarn run build:$VARIANT",
"build:": "yarn run build:main",
"build:debug": "yarn run build-debug:main",
"build:main": "yarn --cwd server build && yarn --cwd client build",
"build-debug": "rimraf ./out && yarn run build-debug:main",
"build-debug:main": "yarn --cwd server build-debug && yarn --cwd client build-debug",
"build-debug:attach-server": "rimraf ./out && yarn --cwd server build-debug:attac-server && yarn --cwd client build-debug",
"lint": "eslint client server --ext ts",
"format-staged": "(git diff --ignore-submodules --quiet && yarn format) || pretty-quick client server",
"format": "prettier --write client server",
"package": "yarn vsce package",
"package-dev": "VARIANT=\"debug\" yarn 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 && prettier --write package.json",
"prepush": "yarn generate-package && yarn format-staged && yarn lint --fix && yarn compile",
"devYarn": "yarn && yarn --cwd client && yarn --cwd server",
"postinstall": "yarn --cwd client && yarn --cwd server",
"dev": "yarn devYarn && 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/rimraf": "^3",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"esbuild": "^0.14.27",
"eslint": "^8.9.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"gts": "^3.1.0",
"mocha": "^9.2.0",
"prettier": "^2.5.1",
"prettier-plugin-sort-imports": "^1.5.12",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"ts-loader": "^9.2.6",
"tsx": "^3.7.0",
"typescript": "^4.5.5",
"vsce": "^2.10.0",
"vscode-generate-package-json": "^1.2.0",
"vscode-languageclient": "^8.0.1",
"vscode-test": "^1.6.1"
},
"packageManager": "yarn@3.1.1",
"dependencies": {
"tmp-promise": "^3.0.3"
}
}