-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathpackage.json
More file actions
233 lines (233 loc) · 8.19 KB
/
package.json
File metadata and controls
233 lines (233 loc) · 8.19 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
{
"name": "php-namespace-resolver",
"displayName": "PHP Namespace Resolver",
"description": "Import and expand php namespaces",
"version": "2.1.3",
"publisher": "MehediDracula",
"author": "Mehedi Hasan <mehedi5531@gmail.com>",
"license": "SEE LICENSE IN LICENSE",
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"Programming Languages",
"Formatters",
"Linters",
"Other"
],
"keywords": [
"php",
"namespace",
"class",
"import",
"expand",
"autoload",
"psr-4",
"php8"
],
"galleryBanner": {
"color": "#282c34",
"theme": "dark"
},
"activationEvents": [
"onLanguage:php"
],
"main": "./out/extension.js",
"icon": "images/icon.png",
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"lint": "eslint src/",
"test": "npm run test:unit && npm run test:integration",
"test:unit": "npx mocha out/test/*.test.js",
"test:integration": "node ./out/test/runTests.js"
},
"contributes": {
"menus": {
"editor/context": [
{
"when": "resourceLangId == php",
"command": "phpNamespaceResolver.import",
"group": "0_namespace_resolver@1"
},
{
"when": "resourceLangId == php",
"command": "phpNamespaceResolver.importAll",
"group": "0_namespace_resolver@2"
},
{
"when": "resourceLangId == php",
"command": "phpNamespaceResolver.expand",
"group": "0_namespace_resolver@3"
},
{
"when": "resourceLangId == php",
"command": "phpNamespaceResolver.sort",
"group": "0_namespace_resolver@4"
},
{
"when": "resourceLangId == php",
"command": "phpNamespaceResolver.removeUnused",
"group": "0_namespace_resolver@5"
},
{
"when": "resourceLangId == php",
"command": "phpNamespaceResolver.generateNamespace",
"group": "0_namespace_resolver@6"
}
]
},
"configuration": {
"type": "object",
"title": "PHP Namespace Resolver",
"properties": {
"phpNamespaceResolver.exclude": {
"type": "string",
"default": "**/node_modules/**",
"description": "Exclude glob pattern while finding files"
},
"phpNamespaceResolver.autoSort": {
"type": "boolean",
"default": true,
"description": "Automatically sort imports after adding a new one"
},
"phpNamespaceResolver.sortOnSave": {
"type": "boolean",
"default": false,
"description": "Automatically sort imports when a file is saved"
},
"phpNamespaceResolver.sortMode": {
"type": "string",
"enum": [
"natural",
"length",
"alphabetical"
],
"default": "natural",
"description": "How to sort imports: natural order, line length, or alphabetically"
},
"phpNamespaceResolver.leadingSeparator": {
"type": "boolean",
"default": true,
"description": "Prepend a leading backslash when expanding class names"
},
"phpNamespaceResolver.removeOnSave": {
"type": "boolean",
"default": false,
"description": "Automatically remove unused imports when a file is saved"
},
"phpNamespaceResolver.autoImportOnSave": {
"type": "boolean",
"default": false,
"description": "Automatically import all detected classes when a file is saved"
},
"phpNamespaceResolver.ignoreList": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Class names to exclude from all diagnostics (e.g. [\"Yii\"])"
},
"phpNamespaceResolver.highlightNotImported": {
"type": "boolean",
"default": true,
"description": "Enable/disable 'Class X is not imported' warnings"
},
"phpNamespaceResolver.highlightNotUsed": {
"type": "boolean",
"default": true,
"description": "Enable/disable 'Imported class X is not used' warnings"
}
}
},
"commands": [
{
"title": "Import Class",
"command": "phpNamespaceResolver.import",
"category": "PHP Namespace Resolver"
},
{
"title": "Import All Classes",
"command": "phpNamespaceResolver.importAll",
"category": "PHP Namespace Resolver"
},
{
"title": "Expand Class",
"command": "phpNamespaceResolver.expand",
"category": "PHP Namespace Resolver"
},
{
"title": "Sort Imports",
"command": "phpNamespaceResolver.sort",
"category": "PHP Namespace Resolver"
},
{
"title": "Generate Namespace",
"command": "phpNamespaceResolver.generateNamespace",
"category": "PHP Namespace Resolver"
},
{
"title": "Remove Unused Imports",
"command": "phpNamespaceResolver.removeUnused",
"category": "PHP Namespace Resolver"
},
{
"title": "Rebuild Namespace Index",
"command": "phpNamespaceResolver.rebuildIndex",
"category": "PHP Namespace Resolver"
}
],
"keybindings": [
{
"command": "phpNamespaceResolver.import",
"key": "ctrl+alt+i",
"when": "editorTextFocus"
},
{
"command": "phpNamespaceResolver.importAll",
"key": "ctrl+alt+a",
"when": "editorTextFocus"
},
{
"command": "phpNamespaceResolver.expand",
"key": "ctrl+alt+e",
"when": "editorTextFocus"
},
{
"command": "phpNamespaceResolver.sort",
"key": "ctrl+alt+s",
"when": "editorTextFocus"
},
{
"command": "phpNamespaceResolver.generateNamespace",
"key": "ctrl+alt+g",
"when": "editorTextFocus"
},
{
"command": "phpNamespaceResolver.removeUnused",
"key": "ctrl+alt+r",
"when": "editorTextFocus"
}
]
},
"repository": {
"type": "git",
"url": "https://github.com/MehediDracula/PHP-Namespace-Resolver"
},
"bugs": {
"url": "https://github.com/MehediDracula/PHP-Namespace-Resolver/issues"
},
"devDependencies": {
"@types/mocha": "^10.0.0",
"@types/node": "18.x",
"@types/vscode": "^1.75.0",
"@typescript-eslint/eslint-plugin": "^8.55.0",
"@typescript-eslint/parser": "^8.55.0",
"@vscode/test-electron": "^2.3.0",
"eslint": "^9.39.2",
"mocha": "^10.2.0",
"typescript": "^5.3.0"
}
}