Skip to content

Commit 4a71f47

Browse files
authored
chore: force via lint ending comma (#195)
1 parent b438ad4 commit 4a71f47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+231
-225
lines changed

e2e/config.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ export const api = {
77
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/mimir/ds`,
88
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/mimir/ds/{dataset_id}`,
99
field: {
10-
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/mimir/ds/{dataset_id}/field`
10+
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/mimir/ds/{dataset_id}/field`,
1111
},
12-
relation: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/mimir/ds/relation`
12+
relation: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/mimir/ds/relation`,
1313
},
1414
fileset: {
1515
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/bestla/fs`,
1616
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/bestla/fs/{fileset_id}`,
1717
field: {
18-
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/bestla/fs/{fileset_id}/field`
19-
}
18+
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/bestla/fs/{fileset_id}/field`,
19+
},
2020
},
2121
channel: {
2222
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/sharky/channel`,
23-
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/sharky/channel/{channel_id}`
23+
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/sharky/channel/{channel_id}`,
2424
},
2525
apikey: {
2626
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/utgard/`,
27-
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/utgard/{key}`
27+
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/utgard/{key}`,
2828
},
2929
policy: {
3030
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/rakshak/policies/`,
31-
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/rakshak/policies/{policy_id}`
31+
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/rakshak/policies/{policy_id}`,
3232
},
3333
ums: {
3434
schema: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/midgard/schema`,
@@ -40,5 +40,5 @@ export const api = {
4040
flows: {
4141
create: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/enigma/actions`,
4242
delete: `${MANAGEMENT}/${process.env.E2E_PROJECT_ID}/enigma/actions/{flow_id}`,
43-
}
43+
},
4444
};

e2e/lib/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Joi from "joi";
33
export const BackendRequestSchema = Joi.object().keys({
44
headers: Joi.object(),
55
method: Joi.string().allow("GET", "POST", "PUT", "PATCH", "DELETE").required(),
6-
body: Joi.any()
6+
body: Joi.any(),
77
});
88

99
export const BackendErrorSchema = Joi.object().keys({

e2e/lib/dataset.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import * as Joi from "joi";
33
export const DatasetRecordSchema = Joi.object().keys({
44
id: Joi.string().required(),
55
created_at: Joi.string().required(),
6-
updated_at: Joi.string().required()
6+
updated_at: Joi.string().required(),
77
});

e2e/lib/rtc.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ export const RTCActionSchema = Joi.string().valid("created", "updated", "deleted
44

55
export const RTCResourceSchema = Joi.object().keys({
66
type: Joi.string().valid("ds", "fs").required(),
7-
name: Joi.string().required()
7+
name: Joi.string().required(),
88
});
99

1010
export const RTCRecordSchema = Joi.object().keys({
11-
id: Joi.string().uuid().required()
11+
id: Joi.string().uuid().required(),
1212
});
1313

1414
export const RTCMessageSchema = Joi.object().keys({
1515
action: RTCActionSchema.required(),
1616
resource: RTCResourceSchema.required(),
1717
modifier: Joi.object().keys({
18-
id: Joi.string().required()
18+
id: Joi.string().required(),
1919
}).required(),
2020
timestamp: Joi.string().isoDate().required(),
21-
data: Joi.array().items(RTCRecordSchema).required()
21+
data: Joi.array().items(RTCRecordSchema).required(),
2222
});
2323

2424
export const RTCChannelMessageSchema = Joi.object().keys({
2525
action: Joi.string().valid("published"),
2626
resource: Joi.object().keys({
2727
type: Joi.string().valid("channel").required(),
28-
name: Joi.string().required()
28+
name: Joi.string().required(),
2929
}),
3030
modifier: Joi.object().keys({
31-
id: Joi.string().required()
31+
id: Joi.string().required(),
3232
}).required(),
3333
timestamp: Joi.string().isoDate().required(),
34-
data: Joi.any().required()
34+
data: Joi.any().required(),
3535
});
3636

3737
export const RTCChannelStoredMessageSchema = Joi.object().keys({

e2e/lib/ums.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export const UserSchema = Joi.object().keys({
66
active: Joi.boolean().required(),
77
confirmed_at: Joi.when("active", { is: true, then: Joi.string(), otherwise: null }).required(),
88
created_at: Joi.string().required(),
9-
updated_at: Joi.string().required()
9+
updated_at: Joi.string().required(),
1010
});

e2e/management.ts

+22-22
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,21 @@ export class Management {
7272
private get headers() {
7373
return {
7474
"Authorization": `Bearer ${this.token}`,
75-
"Content-Type": "application/json"
75+
"Content-Type": "application/json",
7676
};
7777
}
7878

7979
public login(): Promise<any> {
8080
return this.fetch(api.login, {
8181
method: "POST",
8282
headers: {
83-
"Content-Type": "application/json"
83+
"Content-Type": "application/json",
8484
},
8585
body: JSON.stringify({
8686
email: process.env.E2E_EMAIL,
8787
password: process.env.E2E_PASSWORD,
8888
recaptchaToken: process.env.RECAPTCHA_TOKEN,
89-
})
89+
}),
9090
}).then((res: any) => res.json())
9191
.then((tokens: { access_token: string, refresh_token: string}) => {
9292
this.token = tokens.access_token;
@@ -97,23 +97,23 @@ export class Management {
9797
return this.fetch(api.dataset.create, {
9898
method: "POST",
9999
headers: this.headers,
100-
body: JSON.stringify({ name })
100+
body: JSON.stringify({ name }),
101101
})
102102
.then((response: Response) => response.json());
103103
}
104104

105105
public deleteDataset(id: string): Promise<any> {
106106
return this.fetch(api.dataset.delete.replace("{dataset_id}", id), {
107107
method: "DELETE",
108-
headers: this.headers
108+
headers: this.headers,
109109
});
110110
}
111111

112112
public createDatasetField(datasetId: string, field: ISetField): Promise<any> {
113113
return this.fetch(api.dataset.field.create.replace("{dataset_id}", datasetId), {
114114
method: "POST",
115115
headers: this.headers,
116-
body: JSON.stringify(field)
116+
body: JSON.stringify(field),
117117
})
118118
.then((response: Response) => response.json());
119119
}
@@ -130,7 +130,7 @@ export class Management {
130130
public deleteChannel(id: string): Promise<void> {
131131
return this.fetch(api.channel.delete.replace("{channel_id}", id), {
132132
method: "DELETE",
133-
headers: this.headers
133+
headers: this.headers,
134134
})
135135
.then((response: Response) => response.json());
136136
}
@@ -139,15 +139,15 @@ export class Management {
139139
return this.fetch(api.apikey.create, {
140140
method: "POST",
141141
headers: this.headers,
142-
body: JSON.stringify({ description: "test API key" })
142+
body: JSON.stringify({ description: "test API key" }),
143143
})
144144
.then((response: Response) => response.json());
145145
}
146146

147147
public deleteApiKey(key: string): Promise<any> {
148148
return this.fetch(api.apikey.delete.replace("{key}", key), {
149149
method: "DELETE",
150-
headers: this.headers
150+
headers: this.headers,
151151
});
152152
}
153153

@@ -160,15 +160,15 @@ export class Management {
160160
actions: { read: [], create: [], update: [], delete: [] },
161161
subjects: keys,
162162
resources: resources.map((resource) => resource.id),
163-
})
163+
}),
164164
})
165165
.then((response: Response) => response.json());
166166
}
167167

168168
public deletePolicy(id: string): Promise<any> {
169169
return this.fetch(api.policy.delete.replace("{policy_id}", id), {
170170
method: "DELETE",
171-
headers: this.headers
171+
headers: this.headers,
172172
});
173173
}
174174

@@ -185,25 +185,25 @@ export class Management {
185185
{ key: "key", value: AWS_KEY },
186186
{ key: "secret", value: AWS_SECRET },
187187
{ key: "bucket", value: AWS_BUCKET },
188-
]
189-
}
190-
})
188+
],
189+
},
190+
}),
191191
})
192192
.then((response: Response) => response.json());
193193
}
194194

195195
public deleteFileset(id: string): Promise<any> {
196196
return this.fetch(api.fileset.delete.replace("{fileset_id}", id), {
197197
method: "DELETE",
198-
headers: this.headers
198+
headers: this.headers,
199199
});
200200
}
201201

202202
public createFilesetField(filesetId: string, field: ISetField): Promise<any> {
203203
return this.fetch(api.fileset.field.create.replace("{fileset_id}", filesetId), {
204204
method: "POST",
205205
headers: this.headers,
206-
body: JSON.stringify(field)
206+
body: JSON.stringify(field),
207207
})
208208
.then((response: Response) => response.json());
209209
}
@@ -215,17 +215,17 @@ export class Management {
215215
body: JSON.stringify({
216216
from_resource: {
217217
namespace: "mimir",
218-
resource_id: from.id
218+
resource_id: from.id,
219219
},
220220
to_resource: {
221221
namespace: "mimir",
222-
resource_id: to.id
222+
resource_id: to.id,
223223
},
224224
type: {
225225
from_cardinality: fromCardinality,
226226
to_cardinality: toCardinality,
227-
}
228-
})
227+
},
228+
}),
229229
})
230230
.then((response: Response) => response.json());
231231
}
@@ -258,7 +258,7 @@ export class Management {
258258
public deleteGateway(id: string): Promise<void> {
259259
return this.fetch(api.gateways.delete.replace("{gateway_id}", id), {
260260
method: "DELETE",
261-
headers: this.headers
261+
headers: this.headers,
262262
})
263263
.then((response: Response) => response.json());
264264
}
@@ -275,7 +275,7 @@ export class Management {
275275
public deleteFlow(id: string): Promise<void> {
276276
return this.fetch(api.flows.delete.replace("{flow_id}", id), {
277277
method: "DELETE",
278-
headers: this.headers
278+
headers: this.headers,
279279
})
280280
.then((response: Response) => response.json());
281281
}

e2e/stories/dataset/aggregations.e2e.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jest.setTimeout(15000);
55

66
const fields: ISetField[] = [{
77
name: "name",
8-
type: "string"
8+
type: "string",
99
}, {
1010
name: "age",
1111
type: "integer",

e2e/stories/dataset/create-record.e2e.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ describe("create record REST API", () => {
1919
.subscribe((result) => {
2020
joiAssert(result, Joi.array()
2121
.items(DatasetRecordSchema.append({
22-
test_field: Joi.string().valid("name").required()
22+
test_field: Joi.string().valid("name").required(),
2323
}))
24-
.length(1)
24+
.length(1),
2525
);
2626

2727
done();
@@ -33,14 +33,14 @@ describe("create record REST API", () => {
3333
.insert([
3434
{test_field: "name1"},
3535
{test_field: "name2"},
36-
{test_field: "name3"}
36+
{test_field: "name3"},
3737
])
3838
.subscribe((result) => {
3939
joiAssert(result, Joi.array()
4040
.items(DatasetRecordSchema.append({
41-
test_field: Joi.string().valid("name1", "name2", "name3").required()
41+
test_field: Joi.string().valid("name1", "name2", "name3").required(),
4242
}))
43-
.length(3)
43+
.length(3),
4444
);
4545

4646
done();
@@ -55,9 +55,9 @@ describe("create record REST API", () => {
5555
.subscribe((result) => {
5656
joiAssert(result, Joi.array()
5757
.items(DatasetRecordSchema.append({
58-
test_field: Joi.string().valid("name").required()
58+
test_field: Joi.string().valid("name").required(),
5959
}))
60-
.length(1)
60+
.length(1),
6161
);
6262

6363
done();

e2e/stories/dataset/delete-record.e2e.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe("delete record REST API", () => {
6262
(error) => {
6363
joiAssert(error, BAD_REQUEST_ERROR);
6464
done();
65-
}
65+
},
6666
);
6767
});
6868
});

e2e/stories/dataset/output-record.e2e.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("output record fields REST API", () => {
3838
() => ({
3939
title: faker.lorem.sentence(5),
4040
user: fakeUser(),
41-
})
41+
}),
4242
);
4343

4444
const testData = Array.from(
@@ -47,7 +47,7 @@ describe("output record fields REST API", () => {
4747
[FIELD.TITLE]: faker.name.findName(),
4848
[FIELD.AUTHOR]: fakeUser(),
4949
[FIELD.COMMENTS]: fakeComments(),
50-
})
50+
}),
5151
);
5252

5353
beforeAll(async () => {

e2e/stories/dataset/select-record.e2e.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("filter records REST API", () => {
5353
(error: any) => {
5454
joiAssert(error, BackendErrorSchema);
5555
done();
56-
}
56+
},
5757
);
5858
});
5959
}
@@ -613,7 +613,7 @@ describe("filter records REST API", () => {
613613
(v, index) => ({
614614
[FIELD.STRING]: faker.name.findName(),
615615
[FIELD.INTEGER]: faker.random.number({ min: index }),
616-
})
616+
}),
617617
);
618618
let sortField: string;
619619

e2e/stories/dataset/update-record.e2e.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ describe("update record REST API", () => {
2929
.pipe(
3030
switchMap(([record]) => dataset
3131
.update({ [DEFAULT_DATASET.FIELD]: newName })
32-
.where(field("id").isEqualTo(record.id))
32+
.where(field("id").isEqualTo(record.id)),
3333
),
3434
)
3535
.subscribe((updateResult) => {
3636
joiAssert(updateResult, Joi.array()
3737
.items(DatasetRecordSchema.append({
38-
[DEFAULT_DATASET.FIELD]: Joi.string().valid(newName).required()
38+
[DEFAULT_DATASET.FIELD]: Joi.string().valid(newName).required(),
3939
}))
4040
.length(1),
4141
);

0 commit comments

Comments
 (0)