Reformat codebase with trailing commas in functions (#2006)

* style: 💄 Update trailing commas in API

* style: 💄 Update trailing commas in core

* style: 💄 Update trailing commas in rose

* style: 💄 Update trailing commas in admin

* style: 💄 Update trailing commas in desktop
This commit is contained in:
Zhihe Li authored and GitHub committed 2023-11-22 14:07:41 -05:00
1 parent cb3a9e3bdc
commit bcf004b8a4
423 files changed
+1636 -1605

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ export default class AccountModel extends GeneratedAccountModel {
changePassword(
currentPassword,
newPassword,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'change-password',
+4 -4
View File
@@ -138,7 +138,7 @@ export default class RoleModel extends GeneratedRoleModel {
const authMethods = this.resourceFilterStore.queryBy(
'auth-method',
{ type: [TYPE_AUTH_METHOD_OIDC, TYPE_AUTH_METHOD_LDAP] },
{ scope_id: 'global', recursive: true }
{ scope_id: 'global', recursive: true },
);
// For each auth method, query all managed groups with IDs
@@ -149,9 +149,9 @@ export default class RoleModel extends GeneratedRoleModel {
methods.map(({ id: auth_method_id }) =>
this.resourceFilterStore
.queryBy('managed-group', { id: ids }, { auth_method_id })
.then((models) => models.map((model) => model))
)
)
.then((models) => models.map((model) => model)),
),
),
)
// The result is an array of arrays of model instances (grouped by
// auth methods), so these must be flattened.
+1 -1
View File
@@ -76,7 +76,7 @@ class SessionCredential {
if (this.#payloadSecret?.decoded) {
const secretJSON = this.#payloadSecret.decoded;
return Object.keys(secretJSON).map(
(key) => new SessionCredential.SecretItem(key, secretJSON[key])
(key) => new SessionCredential.SecretItem(key, secretJSON[key]),
);
} else {
// decode from base64
+8 -8
View File
@@ -122,7 +122,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
get isActive() {
const pendingOrActiveSessions = this.sessions.filter(
(s) => s.isActive || s.isPending
(s) => s.isActive || s.isPending,
);
return Boolean(pendingOrActiveSessions.length);
}
@@ -195,7 +195,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
addBrokeredCredentialSources(
brokeredCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'add-credential-sources',
@@ -221,7 +221,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
addInjectedApplicationCredentialSources(
injectedApplicationCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'add-credential-sources',
@@ -247,7 +247,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
removeBrokeredCredentialSources(
brokeredCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'remove-credential-sources',
@@ -272,7 +272,7 @@ export default class TargetModel extends GeneratedTargetModel {
removeBrokeredCredentialSource(brokeredCredentialSourceID, options) {
return this.removeBrokeredCredentialSources(
[brokeredCredentialSourceID],
options
options,
);
}
@@ -286,7 +286,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
removeInjectedApplicationCredentialSources(
injectedApplicationCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'remove-credential-sources',
@@ -310,11 +310,11 @@ export default class TargetModel extends GeneratedTargetModel {
*/
removeInjectedApplicationCredentialSource(
injectedApplicationCredentialSourceID,
options
options,
) {
return this.removeInjectedApplicationCredentialSources(
[injectedApplicationCredentialSourceID],
options
options,
);
}
+2 -2
View File
@@ -37,7 +37,7 @@ export default class WorkerModel extends GeneratedWorkerModel {
return Object.values(this.config_tags).reduce(
(previousCount, currentTags) => previousCount + currentTags.length,
0
0,
);
}
@@ -51,7 +51,7 @@ export default class WorkerModel extends GeneratedWorkerModel {
}
return Object.entries(this.config_tags).flatMap(([key, value]) =>
value.map((tag) => ({ key, value: tag }))
value.map((tag) => ({ key, value: tag })),
);
}