From 5a540bba9e80b7d122eab74013db2eefcdf0e261 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Wed, 13 Jan 2021 15:34:06 -0500 Subject: [PATCH] Fixed trailing comma lint warnings (#772) * Fixed trailing comma lint warnings * Specified options on tslint comma rule --- src/app/send/add-edit.component.ts | 6 +++--- src/app/settings/change-password.component.ts | 2 +- src/app/settings/emergency-access.component.ts | 4 ++-- tslint.json | 10 ++++++++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/app/send/add-edit.component.ts b/src/app/send/add-edit.component.ts index 8c6af65a82..406f8e3434 100644 --- a/src/app/send/add-edit.component.ts +++ b/src/app/send/add-edit.component.ts @@ -17,9 +17,9 @@ import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { SendService } from 'jslib/abstractions/send.service'; import { UserService } from 'jslib/abstractions/user.service'; -import { SendView } from 'jslib/models/view/sendView'; import { SendFileView } from 'jslib/models/view/sendFileView'; import { SendTextView } from 'jslib/models/view/sendTextView'; +import { SendView } from 'jslib/models/view/sendView'; import { Send } from 'jslib/models/domain/send'; @@ -72,7 +72,7 @@ export class AddEditComponent { { name: i18nService.t('custom'), value: 0 }, ]; this.expirationDateOptions = [ - { name: i18nService.t('never'), value: null } + { name: i18nService.t('never'), value: null }, ].concat([...this.deletionDateOptions]); } @@ -202,7 +202,7 @@ export class AddEditComponent { } typeChanged() { - if (!this.canAccessPremium && this.send.type == SendType.File && !this.premiumRequiredAlertShown) { + if (!this.canAccessPremium && this.send.type === SendType.File && !this.premiumRequiredAlertShown) { this.premiumRequiredAlertShown = true; this.messagingService.send('premiumRequired'); } diff --git a/src/app/settings/change-password.component.ts b/src/app/settings/change-password.component.ts index 32bc124889..420eea9e5f 100644 --- a/src/app/settings/change-password.component.ts +++ b/src/app/settings/change-password.component.ts @@ -41,7 +41,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent { userService: UserService, passwordGenerationService: PasswordGenerationService, platformUtilsService: PlatformUtilsService, policyService: PolicyService, private folderService: FolderService, private cipherService: CipherService, - private syncService: SyncService, private apiService: ApiService, ) { + private syncService: SyncService, private apiService: ApiService ) { super(i18nService, cryptoService, messagingService, userService, passwordGenerationService, platformUtilsService, policyService); } diff --git a/src/app/settings/emergency-access.component.ts b/src/app/settings/emergency-access.component.ts index e2258531ab..b3838858ec 100644 --- a/src/app/settings/emergency-access.component.ts +++ b/src/app/settings/emergency-access.component.ts @@ -177,7 +177,7 @@ export class EmergencyAccessComponent implements OnInit { details.name || details.email, this.i18nService.t('requestAccess'), this.i18nService.t('no'), - 'warning' + 'warning', ); if (!confirmed) { @@ -198,7 +198,7 @@ export class EmergencyAccessComponent implements OnInit { details.name || details.email, this.i18nService.t('approve'), this.i18nService.t('no'), - 'warning' + 'warning', ); if (!confirmed) { diff --git a/tslint.json b/tslint.json index c28f3d1a62..334f24d78b 100644 --- a/tslint.json +++ b/tslint.json @@ -57,9 +57,15 @@ "trailing-comma": [ true, { - "multiline": "always", + "multiline": { + "objects": "always", + "arrays": "always", + "functions": "ignore", + "typeLiterals": "ignore" + }, "singleline": "never" } - ] + ], + "arrow-parens": false } }