-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
68 lines (67 loc) · 2.99 KB
/
config.schema.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Record<string,string>": {
"type": "object"
},
"default_1": {
"description": "Interface describing how the outputted imports should be formatted.",
"properties": {
"bracketIndent": {
"description": "The indent at the start and end of the named imports.",
"type": "number"
},
"indent": {
"description": "The indent if the import needs to use line break in order to fit.",
"type": "number"
},
"maxColumns": {
"description": "The max columns the output should not overlap.",
"type": "number"
},
"quoteStyle": {
"description": "The quote style to use for the import source.",
"enum": [
"double",
"single"
],
"type": "string"
}
},
"type": "object"
}
},
"description": "Interface describing how configs should look.\n\nUsed by{@linkConfigHandler}.",
"properties": {
"formatting": {
"$ref": "#/definitions/default_1",
"description": "Formatting options."
},
"require": {
"$ref": "#/definitions/Record<string,string>",
"description": "An object containing custom compare functions.\nUse the key for the function name and the value for the path of compare\nfunction relative to the config file.\n\nTo make sure the functions do work correctly, they should implement either{@linkImportCompareFunction},{@linkImportElementCompareFunction}or{@linkSeparateByFunction}and export their function as default."
},
"separateBy": {
"description": "Names of group by functions to determine where to put a separator line.\nOnly one line around every group is possible, therefore the order is not\nimportant.\n\n<b>Note: the names need to be exact with the function names.</b>",
"items": {
"type": "string"
},
"type": "array"
},
"sortImportElements": {
"description": "Names of the compare functions in every import in order of execution.\nPrimp will run through these to sort all import elements.\n\n<b>Note: the names need to be exact with the function names.</b>",
"items": {
"type": "string"
},
"type": "array"
},
"sortImports": {
"description": "Names of the compare functions in order of execution.\nPrimp will run through these to sort all imports.\n\n<b>Note: The names need to be exact with function names.</b>",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}