-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
193 lines (193 loc) · 5.16 KB
/
schema.json
File metadata and controls
193 lines (193 loc) · 5.16 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AutoCorrect Config",
"type": "object",
"properties": {
"fileTypes": {
"default": {},
"description": "Special file type mapping.\nExample:\n{ \"mdx\": \"markdown\" }\nDefault: https://github.com/huacnlee/autocorrect/raw/main/autocorrect/.autocorrectrc.default",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/FileType"
}
},
"rules": {
"default": {},
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/SeverityMode"
},
"description": "Config rules, default rules: https://github.com/huacnlee/autocorrect/raw/main/autocorrect/.autocorrectrc.default",
"properties": {
"space-word": {
"description": "Auto add spacing between CJK (Chinese, Japanese, Korean) and English words.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"space-punctuation": {
"description": "Add space between some punctuations.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"space-bracket": {
"description": "Add space between brackets (), [] when near the CJK.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"space-backticks": {
"description": "Add space between ``, when near the CJK.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"space-dash": {
"description": "Add space between dash `-`",
"default": 0,
"$ref": "#/definitions/SeverityMode"
},
"space-dollar": {
"description": "Add space between dollar $ when near the CJK.",
"default": 0,
"$ref": "#/definitions/SeverityMode"
},
"fullwidth": {
"description": "Convert to fullwidth.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"no-space-punctuation": {
"description": "To remove space near the fullwidth punctuations.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"no-space-fullwidth-quote": {
"description": "To remove space arouned the fullwidth quotes “”, ‘’.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"halfwidth-word": {
"description": "Fullwidth alphanumeric characters to halfwidth.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"halfwidth-punctuation": {
"description": "Fullwidth punctuations to halfwidth in english.",
"default": 1,
"$ref": "#/definitions/SeverityMode"
},
"spellcheck": {
"description": "Spellcheck",
"default": 0,
"$ref": "#/definitions/SeverityMode"
}
}
},
"context": {
"default": {},
"type": "object",
"description": "Enable or disable in special context",
"additionalProperties": {
"$ref": "#/definitions/SeverityMode"
},
"properties": {
"codeblock": {
"description": "Enable or disable to format codeblock in Markdown or AsciiDoc etc.",
"default": 0,
"$ref": "#/definitions/SeverityMode"
}
},
"spellcheck": {
"default": {
"mode": null,
"words": []
},
"allOf": [
{
"$ref": "#/definitions/SpellcheckConfig"
}
]
},
"textRules": {
"default": {},
"type": "object",
"description": "Config text rules, when AutoCorrect matches the text, it will apply the rules. \nFor instance for ignore some text:\n{ \"Hello 你好\": \"off\" }",
"additionalProperties": {
"$ref": "#/definitions/SeverityMode"
}
}
}
},
"definitions": {
"SeverityMode": {
"type": [
"number",
"string"
],
"enum": [
"off",
0,
"error",
1,
"warning",
2
]
},
"FileType": {
"type": "string",
"enum": [
"html",
"yaml",
"sql",
"rust",
"ruby",
"elixir",
"go",
"javascript",
"css",
"json",
"python",
"objective_c",
"strings",
"csharp",
"swift",
"java",
"scala",
"kotlin",
"php",
"dart",
"markdown",
"latex",
"asciidoc",
"gettext",
"conf",
"c",
"xml",
"jupyter",
"text"
]
},
"SpellcheckConfig": {
"type": "object",
"properties": {
"mode": {
"description": "DEPRECATED: use `rules.spellcheck` instead",
"default": null,
"anyOf": [
{
"$ref": "#/definitions/SeverityMode"
},
{
"type": "null"
}
]
},
"words": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}