-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathpackage.json
285 lines (285 loc) · 9.84 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
{
"name": "import-sorter",
"displayName": "TypeScript Import Sorter",
"description": "Extension sorts TypeScript imports according to the configuration provided. The configuration defaults follow ESLint sort-imports rule",
"icon": "assets/icons/import-sorter.png",
"version": "3.3.1",
"publisher": "mike-co",
"engines": {
"vscode": "^1.33.0"
},
"repository": {
"type": "git",
"url": "https://github.com/SoominHan/import-sorter.git"
},
"license": "SEE LICENSE IN LICENSE",
"categories": [
"Formatters"
],
"keywords": [
"Typescript",
"imports",
"sort",
"order",
"sort imports"
],
"activationEvents": [
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onCommand:extension.sortImports",
"onCommand:extension.sortImportsInDirectory"
],
"main": "./out/src/extension",
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "npm run compile && node ./node_modules/vscode/bin/test",
"clean": "rimraf -- node_modules coverage out",
"lint": "tslint src/**/*.ts"
},
"dependencies": {
"glob": "^7.1.2",
"typescript": "^2.6.1",
"lodash": "4.17.4",
"rxjs": "6.3.3"
},
"devDependencies": {
"@types/lodash": "4.14.117",
"@types/mocha": "^2.2.42",
"@types/node": "^8.10.25",
"@types/glob": "^5.0.30",
"vscode-nls": "^2.0.2",
"expect.js": "^0.3.1",
"mocha": "^2.3.3",
"tslint": "^5.8.0",
"vscode": "^1.1.21"
},
"contributes": {
"commands": [
{
"command": "extension.sortImports",
"title": "%command.sortImports%",
"category": "%commands.category%"
},
{
"command": "extension.sortImportsInDirectory",
"title": "%command.sortImportsInDirectory%",
"category": "%commands.category%"
}
],
"keybindings": [
{
"command": "extension.sortImports",
"key": "ctrl+alt+o",
"when": "editorTextFocus && !editorReadonly"
}
],
"menus": {
"explorer/context": [
{
"command": "extension.sortImportsInDirectory",
"group": "1_modification",
"when": "explorerResourceIsFolder && config.importSorter.generalConfiguration.sortImportsInDirectory"
}
]
},
"configuration": {
"type": "object",
"title": "%configuration.title%",
"properties": {
"importSorter.generalConfiguration.configurationFilePath": {
"type": "string",
"default": "./import-sorter.json",
"description": "Default file configuration name"
},
"importSorter.generalConfiguration.sortImportsInDirectory": {
"type": "boolean",
"default": true,
"description": "Enables menu option for sorting in directory"
},
"importSorter.generalConfiguration.sortOnBeforeSave": {
"type": "boolean",
"default": false,
"description": "Enables sort before each save of the document"
},
"importSorter.generalConfiguration.exclude": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Excludes sorting for files which match given regex expression. Regex considers the whole file path. The file path separator is normalized to /"
},
"importSorter.sortConfiguration.importMembers.order": {
"enum": [
"caseInsensitive",
"lowercaseFirst",
"lowercaseLast",
"unsorted"
],
"default": "caseInsensitive",
"description": "Sort Order of names in curly brackets"
},
"importSorter.sortConfiguration.importMembers.direction": {
"enum": [
"asc",
"desc"
],
"default": "asc",
"description": "Sort Direction of names in curly brackets"
},
"importSorter.sortConfiguration.importPaths.order": {
"enum": [
"caseInsensitive",
"lowercaseFirst",
"lowercaseLast",
"unsorted"
],
"default": "caseInsensitive",
"description": "Sort Order of paths"
},
"importSorter.sortConfiguration.importPaths.direction": {
"enum": [
"asc",
"desc"
],
"default": "asc",
"description": "Sort Direction of paths"
},
"importSorter.sortConfiguration.joinImportPaths": {
"type": "boolean",
"default": true,
"description": "Combine imports with the same path"
},
"importSorter.sortConfiguration.removeUnusedImports": {
"type": "boolean",
"default": false,
"description": "Removes not used imports where we do not have explicit side effects"
},
"importSorter.sortConfiguration.removeUnusedDefaultImports": {
"type": "boolean",
"default": false,
"description": "Works only if removeUnusedImports enabled. This option will remove default imports if they are not explicitly used in the source code."
},
"importSorter.sortConfiguration.customOrderingRules.defaultOrderLevel": {
"type": "number",
"default": 20,
"description": "The default order level of everything which is not included into rules"
},
"importSorter.sortConfiguration.customOrderingRules.defaultNumberOfEmptyLinesAfterGroup": {
"type": "number",
"default": 1,
"description": "The default number of empty lines after any group. This has lesser priority then empty lines in rules"
},
"importSorter.sortConfiguration.customOrderingRules.disableDefaultOrderSort": {
"type": "boolean",
"default": false,
"description": "Disable sorting of path on the default group"
},
"importSorter.sortConfiguration.customOrderingRules.rules": {
"type": "array",
"default": [
{
"type": "importMember",
"regex": "^$",
"orderLevel": 5,
"disableSort": true
},
{
"regex": "^[^.@]",
"orderLevel": 10
},
{
"regex": "^[@]",
"orderLevel": 15
},
{
"regex": "^[.]",
"orderLevel": 30
}
],
"description": "The default order level of everything which is not included into rules"
},
"importSorter.importStringConfiguration.tabSize": {
"type": "number",
"default": 4,
"description": "Left number of spaces for the new lined imports. If tabType is set to 'tab', then the configuration defines the size of the tab in number of spaces"
},
"importSorter.importStringConfiguration.tabType": {
"enum": [
"space",
"tab"
],
"default": "space",
"description": "Defines the character which will be printed on each new lined import expression"
},
"importSorter.importStringConfiguration.numberOfEmptyLinesAfterAllImports": {
"type": "number",
"default": 1,
"description": "The number of new lines after the last sorted import"
},
"importSorter.importStringConfiguration.quoteMark": {
"enum": [
"single",
"double"
],
"default": "single",
"description": "The path quotes"
},
"importSorter.importStringConfiguration.maximumNumberOfImportExpressionsPerLine.type": {
"enum": [
"maxLineLength",
"words",
"newLineEachExpressionAfterCountLimit",
"newLineEachExpressionAfterCountLimitExceptIfOnlyOne"
],
"default": "maxLineLength",
"description": "The type of length restriction, before import is moved to a new line"
},
"importSorter.importStringConfiguration.maximumNumberOfImportExpressionsPerLine.count": {
"type": "number",
"default": 100,
"description": "The count of units before import is new-lined"
},
"importSorter.importStringConfiguration.spacingPerImportExpression.afterStartingBracket": {
"type": "number",
"default": 1,
"description": "Number of spaces after {"
},
"importSorter.importStringConfiguration.spacingPerImportExpression.beforeEndingBracket": {
"type": "number",
"default": 1,
"description": "Number of spaces before }"
},
"importSorter.importStringConfiguration.spacingPerImportExpression.beforeComma": {
"type": "number",
"default": 0,
"description": "Number of spaces before comma"
},
"importSorter.importStringConfiguration.spacingPerImportExpression.afterComma": {
"type": "number",
"default": 1,
"description": "Number of spaces after comma"
},
"importSorter.importStringConfiguration.trailingComma": {
"enum": [
"none",
"always",
"multiLine"
],
"default": "none",
"description": "If always/multiLine then adds a trailing comma at the end of the imports for 'single and multi' and 'multi-line' imports respectively. Default is none therefore no trailing comma"
},
"importSorter.importStringConfiguration.hasSemicolon": {
"type": "boolean",
"default": true,
"description": "If true then the import string has a semicolon at the end, otherwise it will not be appended. Default is true"
}
}
}
}
}