Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

prettier: Disable bracketSpacing.

Anders Kaseorg06691e1e45da
diff --git a/prettier.config.js b/prettier.config.js
new file mode 100644
index 00000000000..5f9d8da1698
--- /dev/null
+++ b/prettier.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ bracketSpacing: false,
+};
diff --git a/zerver/openapi/testing.yaml b/zerver/openapi/testing.yaml
index 7e5c4233d19..fff7617fc47 100644
--- a/zerver/openapi/testing.yaml
+++ b/zerver/openapi/testing.yaml
@@ -33,8 +33,8 @@ test1:
{
"top_array":
[
- { "obj": { "str3": "test" } },
- [{ "str1": "success", "str2": "success" }],
+ {"obj": {"str3": "test"}},
+ [{"str1": "success", "str2": "success"}],
],
}
test2:
@@ -73,8 +73,8 @@ test2:
{
"top_array":
[
- { "obj": { "str3": "test", "str4": "extraneous" } },
- [{ "str1": "success", "str2": "success" }],
+ {"obj": {"str3": "test", "str4": "extraneous"}},
+ [{"str1": "success", "str2": "success"}],
],
}
test3:
@@ -109,7 +109,7 @@ test3:
{
"top_array":
[
- { "obj": { "str3": "test" } },
- [{ "str1": "success", "str2": "success" }],
+ {"obj": {"str3": "test"}},
+ [{"str1": "success", "str2": "success"}],
],
}
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index b5ea648d0bd..c7aca4f27be 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -274,7 +274,7 @@ paths:
type: integer
description: |
The ID of the given stream.
- - example: { "msg": "", "result": "success", "stream_id": 15 }
+ - example: {"msg": "", "result": "success", "stream_id": 15}
"400":
description: Bad request.
content:
@@ -441,8 +441,8 @@ paths:
"create_time": 1588145417000,
"messages":
[
- { "id": 102, "date_sent": 1588145424000 },
- { "id": 103, "date_sent": 1588145448000 },
+ {"id": 102, "date_sent": 1588145424000},
+ {"id": 103, "date_sent": 1588145448000},
],
},
],
@@ -540,7 +540,7 @@ paths:
items:
type: object
default: []
- example: [{ "operand": "Denmark", "operator": "stream" }]
+ example: [{"operand": "Denmark", "operator": "stream"}]
- $ref: "#/components/parameters/ClientGravatar"
- name: apply_markdown
in: query
@@ -771,7 +771,7 @@ paths:
be sent. Note that scheduled messages ("Send later") is a beta API and
may change before it's a finished feature.
example: "2020-06-24 11:19:54.337533+00:00"
- - example: { "msg": "", "id": 42, "result": "success" }
+ - example: {"msg": "", "id": 42, "result": "success"}
"400":
description: Bad request.
content:
@@ -952,11 +952,7 @@ paths:
description: |
An array with the IDs of the modified messages.
- example:
- {
- "msg": "",
- "messages": [4, 18, 15],
- "result": "success",
- }
+ {"msg": "", "messages": [4, 18, 15], "result": "success"}
/messages/render:
post:
operationId: render_message
@@ -1092,7 +1088,7 @@ paths:
type: array
items:
type: object
- example: [{ "operator": "has", "operand": "link" }]
+ example: [{"operator": "has", "operand": "link"}]
required: true
responses:
"200":
@@ -1438,21 +1434,21 @@ paths:
"is_guest": false,
"profile_data":
{
- "4": { "value": "vim" },
+ "4": {"value": "vim"},
"2":
{
"value": "I am:\n* The prince of Denmark\n* Nephew to the usurping Claudius",
"rendered_value": "<p>I am:</p>\n<ul>\n<li>The prince of Denmark</li>\n<li>Nephew to the usurping Claudius</li>\n</ul>",
},
- "5": { "value": "1900-1-1" },
- "7": { "value": "[11]" },
- "6": { "value": "https://blog.zulig.org" },
+ "5": {"value": "1900-1-1"},
+ "7": {"value": "[11]"},
+ "6": {"value": "https://blog.zulig.org"},
"1":
{
"value": "+0-11-23-456-7890",
"rendered_value": "<p>+0-11-23-456-7890</p>",
},
- "8": { "value": "zulipbot" },
+ "8": {"value": "zulipbot"},
"3":
{
"rendered_value": "<p>Dark chocolate</p>",
@@ -1562,7 +1558,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
/users/{email}/presence:
get:
@@ -1636,11 +1632,11 @@ paths:
"presence":
{
"website":
- { "timestamp": 1532697622, "status": "active" },
+ {"timestamp": 1532697622, "status": "active"},
"ZulipMobile":
- { "timestamp": 1522687421, "status": "active" },
+ {"timestamp": 1522687421, "status": "active"},
"aggregated":
- { "timestamp": 1532697622, "status": "active" },
+ {"timestamp": 1532697622, "status": "active"},
},
"result": "success",
"msg": "",
@@ -1781,9 +1777,9 @@ paths:
"user_id": 5,
"profile_data":
{
- "5": { "value": "2000-1-1" },
- "4": { "value": "emacs" },
- "7": { "value": "[10]" },
+ "5": {"value": "2000-1-1"},
+ "4": {"value": "emacs"},
+ "7": {"value": "[10]"},
"1":
{
"value": "+1-234-567-8901",
@@ -1794,7 +1790,7 @@ paths:
"rendered_value": "<p>Betrayer of Othello.</p>",
"value": "Betrayer of Othello.",
},
- "8": { "value": "zulip" },
+ "8": {"value": "zulip"},
"3":
{
"value": "Apples",
@@ -1819,7 +1815,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
"400":
description: Bad Request
content:
@@ -1873,9 +1869,9 @@ paths:
"result": "success",
"topics":
[
- { "max_id": 26, "name": "Denmark3" },
- { "max_id": 23, "name": "Denmark1" },
- { "max_id": 6, "name": "Denmark2" },
+ {"max_id": 26, "name": "Denmark3"},
+ {"max_id": 23, "name": "Denmark1"},
+ {"max_id": 6, "name": "Denmark2"},
],
}
"400":
@@ -2177,7 +2173,7 @@ paths:
type: array
items:
type: object
- example: [{ "name": "Verona", "description": "Italian City" }]
+ example: [{"name": "Verona", "description": "Italian City"}]
required: true
- $ref: "#/components/parameters/Principals"
- name: authorization_errors_fatal
@@ -2234,14 +2230,14 @@ paths:
"already_subscribed": {},
"msg": "",
"result": "success",
- "subscribed": { "[email protected]": ["new stream"] },
+ "subscribed": {"[email protected]": ["new stream"]},
}
- allOf:
- $ref: "#/components/schemas/AddSubscriptionsResponse"
- example:
{
"already_subscribed":
- { "[email protected]": ["new stream"] },
+ {"[email protected]": ["new stream"]},
"msg": "",
"result": "success",
"subscribed": {},
@@ -2309,7 +2305,7 @@ paths:
type: string
example:
[
- { "name": "Verona" },
+ {"name": "Verona"},
{
"name": "Denmark",
"color": "#e79ab5",
@@ -2377,7 +2373,7 @@ paths:
{
"msg": "",
"subscribed": {},
- "already_subscribed": { "[email protected]": ["Verona"] },
+ "already_subscribed": {"[email protected]": ["Verona"]},
"not_removed": [],
"removed": ["new stream"],
"result": "success",
@@ -2469,7 +2465,7 @@ paths:
description: |
Whether the user is subscribed to the stream.
- example:
- { "msg": "", "result": "success", "is_subscribed": false }
+ {"msg": "", "result": "success", "is_subscribed": false}
/users/me/subscriptions/muted_topics:
patch:
operationId: mute_topic
@@ -2522,11 +2518,11 @@ paths:
- allOf:
- $ref: "#/components/schemas/JsonError"
- example:
- { "msg": "Topic already muted", "result": "error" }
+ {"msg": "Topic already muted", "result": "error"}
- allOf:
- $ref: "#/components/schemas/JsonError"
- example:
- { "msg": "Topic is not muted", "result": "error" }
+ {"msg": "Topic is not muted", "result": "error"}
/realm/emoji/{emoji_name}:
post:
operationId: upload_custom_emoji
@@ -2661,8 +2657,8 @@ paths:
type: object
example:
[
- { "stream_id": 1, "property": "pin_to_top", "value": true },
- { "stream_id": 3, "property": "color", "value": "#f00f00" },
+ {"stream_id": 1, "property": "pin_to_top", "value": true},
+ {"stream_id": 3, "property": "color", "value": "#f00f00"},
]
required: true
responses:
@@ -2795,21 +2791,21 @@ paths:
"is_guest": false,
"profile_data":
{
- "4": { "value": "vim" },
+ "4": {"value": "vim"},
"2":
{
"value": "I am:\n* The prince of Denmark\n* Nephew to the usurping Claudius",
"rendered_value": "<p>I am:</p>\n<ul>\n<li>The prince of Denmark</li>\n<li>Nephew to the usurping Claudius</li>\n</ul>",
},
- "5": { "value": "1900-1-1" },
- "7": { "value": "[11]" },
- "6": { "value": "https://blog.zulig.org" },
+ "5": {"value": "1900-1-1"},
+ "7": {"value": "[11]"},
+ "6": {"value": "https://blog.zulig.org"},
"1":
{
"value": "+0-11-23-456-7890",
"rendered_value": "<p>+0-11-23-456-7890</p>",
},
- "8": { "value": "zulipbot" },
+ "8": {"value": "zulipbot"},
"3":
{
"rendered_value": "<p>Dark chocolate</p>",
@@ -2884,10 +2880,7 @@ paths:
items:
type: object
example:
- [
- { "id": 4, "value": "vim" },
- { "id": 5, "value": "1909-04-05" },
- ]
+ [{"id": 4, "value": "vim"}, {"id": 5, "value": "1909-04-05"}]
required: false
responses:
@@ -2929,7 +2922,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
"400":
description: Bad Request
content:
@@ -3034,7 +3027,7 @@ paths:
type: integer
description: |
The numeric ID assigned to this filter.
- - example: { "id": 42, "result": "success", "msg": "" }
+ - example: {"id": 42, "result": "success", "msg": ""}
/realm/filters/{filter_id}:
delete:
operationId: remove_linkifier
@@ -3139,7 +3132,7 @@ paths:
application/json:
schema:
type: object
- example: { "notification_settings_null": true }
+ example: {"notification_settings_null": true}
- name: fetch_event_types
in: query
description: |
@@ -3887,7 +3880,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
"400":
description: Bad request.
content:
@@ -3971,7 +3964,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
"400":
description: Bad request.
content:
@@ -4081,7 +4074,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
"400":
description: Bad request.
content:
@@ -4155,7 +4148,7 @@ paths:
schema:
allOf:
- $ref: "#/components/schemas/JsonSuccess"
- - example: { "result": "success", "msg": "" }
+ - example: {"result": "success", "msg": ""}
"400":
description: Bad request.
@@ -4752,7 +4745,7 @@ components:
- success
msg:
type: string
- - example: { "msg": "", "result": "success" }
+ - example: {"msg": "", "result": "success"}
JsonError:
allOf:
- $ref: "#/components/schemas/JsonResponse"
@@ -4879,7 +4872,7 @@ components:
InvalidApiKeyError:
allOf:
- $ref: "#/components/schemas/JsonError"
- - example: { "msg": "Invalid API key", "result": "error" }
+ - example: {"msg": "Invalid API key", "result": "error"}
MissingArgumentError:
allOf:
- $ref: "#/components/schemas/CodedError"