Apply new eslint rules; default to prettier for styling

This commit is contained in:
DaneEveritt 2022-06-26 15:13:52 -04:00
parent f22cce8881
commit dc84af9937
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
218 changed files with 3876 additions and 3564 deletions

View file

@ -9,7 +9,7 @@ interface User extends Model {
twoFactorEnabled: boolean;
createdAt: Date;
permissions: SubuserPermission[];
can (permission: SubuserPermission): boolean;
can(permission: SubuserPermission): boolean;
}
interface SSHKey extends Model {
@ -30,5 +30,5 @@ interface ActivityLog extends Model<'actor'> {
timestamp: Date;
relationships: {
actor: User | null;
}
};
}

View file

@ -10,7 +10,7 @@ export default class Transformers {
fingerprint: data.fingerprint,
createdAt: new Date(data.created_at),
};
}
};
static toUser = ({ attributes }: FractalResponseData): Models.User => {
return {
@ -21,11 +21,11 @@ export default class Transformers {
twoFactorEnabled: attributes['2fa_enabled'],
permissions: attributes.permissions || [],
createdAt: new Date(attributes.created_at),
can (permission): boolean {
can(permission): boolean {
return this.permissions.includes(permission);
},
};
}
};
static toActivityLog = ({ attributes }: FractalResponseData): Models.ActivityLog => {
const { actor } = attributes.relationships || {};
@ -43,8 +43,7 @@ export default class Transformers {
actor: transform(actor as FractalResponseData, this.toUser, null),
},
};
}
};
}
export class MetaTransformers {
}
export class MetaTransformers {}