forked from sourcery-ai/sourcery-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
336 lines (336 loc) · 9.56 KB
/
package.json
File metadata and controls
336 lines (336 loc) · 9.56 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
{
"name": "sourcery",
"displayName": "Sourcery",
"description": "Refactor Python instantly with Sourcery",
"author": "Sourcery AI",
"repository": "https://github.com/sourcery-ai/sourcery-vscode",
"bugs": {
"url": "https://github.com/sourcery-ai/public/issues"
},
"license": "MIT",
"version": "1.2.1-dev.1",
"publisher": "sourcery",
"icon": "sourcery-icon.png",
"keywords": [
"Python",
"refactoring"
],
"engines": {
"vscode": "^1.76.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onLanguage:python",
"onStartupFinished"
],
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "sourcery-explorer",
"title": "Sourcery",
"icon": "sourcery-icon.png"
}
]
},
"views": {
"sourcery-explorer": [
{
"id": "sourcery.rules",
"name": "Rules",
"type": "webview",
"icon": "sourcery-icon.png",
"contextualTitle": "Rules",
"when": "sourceryRulesActive"
},
{
"id": "sourcery.rules.treeview",
"name": "Results",
"contextualTitle": "Results",
"when": "sourceryRulesActive"
}
]
},
"walkthroughs": [
{
"id": "sourcery.walkthrough",
"title": "Get started with Sourcery",
"description": "Your first steps to try out the powerful tools and features that the Sourcery extension has to offer!",
"when": "workspacePlatform != webworker",
"steps": [
{
"id": "sourcery.openWelcomeFile",
"title": "Get your first recommendation",
"description": "Get started by opening our tutorial \n[Open tutorial](command:toSide:sourcery.welcome.open)\n Put the cursor over the underlined code to see the refactoring suggestion. \n You can see all Sourcery's recommendations in the [Problems Pane](command:workbench.actions.view.problems)",
"media": {
"markdown": "walkthrough/view_welcome_file.md"
},
"completionEvents": [
"onCommand:sourcery.welcome.open"
]
},
{
"id": "sourcery.acceptRecommendation",
"title": "Accept your first recommendation",
"description": "Put the cursor on an underline, then click the lightbulb or use the quick fix hotkey to show the code actions.\n Take the `Sourcery - Convert for loop into list comprehension` option to accept the change.\n",
"media": {
"markdown": "walkthrough/accept_recommendation.md"
},
"completionEvents": [
"onContext:acceptRecommendationContextKey"
]
},
{
"id": "sourcery.configuration",
"title": "Configure Sourcery to your needs.",
"description": "Create a configuration file in your project to customise Sourcery.\n[Create config file](command:toSide:sourcery.config.create)\nA very useful setting to start with is the Python version, which lets you tell Sourcery which version you are using.",
"media": {
"markdown": "walkthrough/configuration.md"
},
"completionEvents": [
"onCommand:sourcery.config.create"
]
},
{
"id": "sourcery.customRules",
"title": "Add custom rules",
"description": "You can add your own custom rules to Sourcery!\nFollow the tutorial to find out how.",
"media": {
"markdown": "walkthrough/custom_rules_tutorial.md"
}
},
{
"id": "sourcery.login",
"title": "Login",
"description": "Unlock all of Sourcery's features, including 30 days of Sourcery Pro\n[Login](command:sourcery.login)",
"media": {
"markdown": "walkthrough/login.md"
},
"completionEvents": [
"onContext:sourcery.is_authenticated"
]
},
{
"id": "sourcery.advancedFeatures",
"title": "Advanced Features",
"description": "Once you have logged in you will be able to use Sourcery's Pro features for 30 days\nThese include:\nRight click on a folder and choose 'Sourcery - Scan for refactorings'\n\n You can also try out 'Sourcery - Detect Clones' to find duplicate or near-duplicate code\nTo find out about our Team plan, including pre-commit hook and CLI:\n[Open our documentation](https://docs.sourcery.ai/Plans/Sourcery-Team/)\n",
"media": {
"markdown": "walkthrough/refactoring_scan.md"
},
"completionEvents": [
"onCommand:sourcery.refactor.workspace"
]
}
]
}
],
"viewsWelcome": [
{
"view": "sourcery.rules.treeview",
"contents": "Use this view to perform powerful pattern based search/replace of your codebase using Sourcery's rule syntax.\n[Documentation](https://docs.sourcery.ai/Reference/Custom-Rules/pattern-syntax/#custom-rule-pattern-syntax)\n"
}
],
"commands": [
{
"command": "sourcery.login",
"title": "Login",
"category": "Sourcery"
},
{
"command": "sourcery.hub.start",
"title": "Open Sourcery Hub",
"category": "Sourcery"
},
{
"command": "sourcery.walkthrough.open",
"title": "Open Walkthough",
"category": "Sourcery"
},
{
"command": "sourcery.welcome.open",
"title": "Open welcome file",
"category": "Sourcery"
},
{
"command": "sourcery.refactor.workspace",
"title": "Scan for refactorings",
"category": "Sourcery"
},
{
"command": "sourcery.scan.rule",
"title": "Scan with specific rule",
"category": "Sourcery"
},
{
"command": "sourcery.scan.applyRule",
"title": "Apply specific change from rule",
"category": "Sourcery",
"icon": "$(replace)"
},
{
"command": "sourcery.scan.open",
"title": "Search and Replace across workspace",
"category": "Sourcery"
},
{
"command": "sourcery.clones.workspace",
"title": "Detect clones",
"category": "Sourcery"
},
{
"command": "sourcery.config.create",
"title": "Create a default Sourcery configuration file for your project",
"category": "Sourcery"
},
{
"command": "sourcery.scan.toggleAdvanced",
"title": "Toggle Advanced Mode",
"category": "Sourcery"
},
{
"command": "sourcery.rule.create",
"title": "Create custom rule",
"category": "Sourcery"
}
],
"submenus": [
{
"id": "sourcery.scans",
"label": "Sourcery"
},
{
"id": "sourcery.editor",
"label": "Sourcery"
}
],
"menus": {
"view/title": [
{
"command": "sourcery.scan.toggleAdvanced",
"when": "view == sourcery.rules",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "sourcery.scan.applyRule",
"when": "view == sourcery.rules.treeview && viewItem == editable",
"group": "inline"
}
],
"editor/context": [
{
"submenu": "sourcery.editor",
"group": "z_commands@2"
}
],
"explorer/context": [
{
"submenu": "sourcery.scans",
"group": "1_modification@1"
}
],
"sourcery.editor": [
{
"command": "sourcery.rule.create",
"title": "Create Sourcery rule with this pattern",
"when": "editorLangId==python && editorHasSelection"
}
],
"sourcery.scans": [
{
"command": "sourcery.refactor.workspace",
"group": "1_modification@1",
"when": "resourceLangId == python || explorerResourceIsFolder"
},
{
"command": "sourcery.clones.workspace",
"group": "1_modification@2",
"when": "resourceLangId == python || explorerResourceIsFolder"
}
],
"commandPalette": [
{
"command": "sourcery.refactor.workspace",
"when": "false"
},
{
"command": "sourcery.scan.rule",
"when": "false"
},
{
"command": "sourcery.clones.workspace",
"when": "false"
},
{
"command": "sourcery.scan.applyRule",
"when": "false"
},
{
"command": "sourcery.scan.toggleAdvanced",
"when": "false"
}
]
},
"configuration": {
"title": "Sourcery Configuration",
"type": "object",
"properties": {
"sourcery.token": {
"type": "string",
"default": "",
"description": "Sourcery token. You can find your token at https://sourcery.ai/dashboard",
"markdownDeprecationMessage": "Run the `Sourcery: Login` command instead"
},
"sourcery.ruleType.refactorings": {
"type": "boolean",
"default": true,
"description": "Show refactorings."
},
"sourcery.ruleType.suggestions": {
"type": "boolean",
"default": true,
"description": "Show suggestions."
},
"sourcery.ruleType.comments": {
"type": "boolean",
"default": true,
"description": "Show comments."
}
}
}
},
"main": "./out/extension",
"scripts": {
"vscode:prepublish": "tsc -p ./",
"vscode:uninstall": "node ./out/uninstall",
"compile": "tsc -watch -p ./",
"vscode": "npm run vscode:prepublish && VSCODE=$(which code-insiders || which code || echo echo ERROR: neither the code nor code-insiders vscode executable is installed); USER=dummy-dont-share-vscode-instance \"$VSCODE\" --user-data-dir=$PWD/.vscode-dev/user-data --verbose --extensionHomePath=$PWD/.vscode-dev/extensions --extensionDevelopmentPath=$PWD $*",
"vscode_local": "SOURCERY_EXECUTABLE=../core/run-sourcery.sh yarn run vscode"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "^18.15.1",
"@types/vscode": "^1.76.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@vscode/vsce": "^2.18.0",
"eslint": "^8.36.0",
"mocha": "^10.2.0",
"ovsx": "^0.8.0",
"typescript": "^4.9.5",
"version-bump-prompt": "^6.1.0",
"vscode-test": "^1.6.1"
},
"dependencies": {
"vscode-languageclient": "^8.1.0"
},
"__metadata": {
"id": "0bb8a841-96c3-4e2d-ab43-cffee71480a4",
"publisherDisplayName": "sourcery",
"publisherId": "076dffab-0485-4bcd-bc6c-62c3a0c7502a",
"isPreReleaseVersion": false
}
}