From 58e39c0c813b2a2857760ab380a201a0b49fcc0d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 8 Feb 2018 10:37:54 -0500 Subject: [PATCH] lint fixes --- src/app/accounts/environment.component.ts | 2 +- src/app/accounts/hint.component.ts | 7 +-- src/app/accounts/login.component.ts | 5 +- src/app/accounts/register.component.ts | 7 +-- .../accounts/two-factor-options.component.ts | 3 +- src/app/accounts/two-factor.component.ts | 15 +++--- src/app/app.component.ts | 5 +- src/app/app.module.ts | 52 +++++++++++-------- src/app/directives/autofocus.directive.ts | 6 +-- src/app/main.ts | 2 + src/app/pipes/search-ciphers.pipe.ts | 2 +- src/app/services/services.module.ts | 8 +-- src/app/vault/add-edit.component.ts | 9 ++-- src/app/vault/attachments.component.ts | 10 ++-- src/app/vault/ciphers.component.ts | 6 +-- src/app/vault/folder-add-edit.component.ts | 6 +-- src/app/vault/groupings.component.ts | 2 +- src/app/vault/password-generator.component.ts | 2 +- src/app/vault/vault.component.ts | 33 ++++++------ src/app/vault/view.component.ts | 2 +- src/services/desktopStorage.service.ts | 1 + webpack.renderer.js | 5 ++ 22 files changed, 100 insertions(+), 90 deletions(-) diff --git a/src/app/accounts/environment.component.ts b/src/app/accounts/environment.component.ts index 2f76943416d..56dadf4daec 100644 --- a/src/app/accounts/environment.component.ts +++ b/src/app/accounts/environment.component.ts @@ -6,8 +6,8 @@ import { Output, } from '@angular/core'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { EnvironmentService } from 'jslib/abstractions/environment.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; diff --git a/src/app/accounts/hint.component.ts b/src/app/accounts/hint.component.ts index 023dc15fd88..8b57336e8f3 100644 --- a/src/app/accounts/hint.component.ts +++ b/src/app/accounts/hint.component.ts @@ -1,13 +1,10 @@ import * as template from './hint.component.html'; -import { - Component, -} from '@angular/core'; - +import { Component } from '@angular/core'; import { Router } from '@angular/router'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { PasswordHintRequest } from 'jslib/models/request/passwordHintRequest'; diff --git a/src/app/accounts/login.component.ts b/src/app/accounts/login.component.ts index ba3f4f029db..fccf0aa58c7 100644 --- a/src/app/accounts/login.component.ts +++ b/src/app/accounts/login.component.ts @@ -6,14 +6,13 @@ import { ViewChild, ViewContainerRef, } from '@angular/core'; - import { Router } from '@angular/router'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; -import { EnvironmentComponent } from './environment.component'; import { ModalComponent } from '../modal.component'; +import { EnvironmentComponent } from './environment.component'; import { AuthResult } from 'jslib/models/domain/authResult'; diff --git a/src/app/accounts/register.component.ts b/src/app/accounts/register.component.ts index 1d796410654..f55dadf4e92 100644 --- a/src/app/accounts/register.component.ts +++ b/src/app/accounts/register.component.ts @@ -1,13 +1,10 @@ import * as template from './register.component.html'; -import { - Component, -} from '@angular/core'; - +import { Component } from '@angular/core'; import { Router } from '@angular/router'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { RegisterRequest } from 'jslib/models/request/registerRequest'; diff --git a/src/app/accounts/two-factor-options.component.ts b/src/app/accounts/two-factor-options.component.ts index acdb4a10d31..49c6b14f043 100644 --- a/src/app/accounts/two-factor-options.component.ts +++ b/src/app/accounts/two-factor-options.component.ts @@ -7,11 +7,10 @@ import { OnInit, Output, } from '@angular/core'; - import { Router } from '@angular/router'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { TwoFactorProviderType } from 'jslib/enums/twoFactorProviderType'; diff --git a/src/app/accounts/two-factor.component.ts b/src/app/accounts/two-factor.component.ts index e595c5de17c..c2ee7ba6e1d 100644 --- a/src/app/accounts/two-factor.component.ts +++ b/src/app/accounts/two-factor.component.ts @@ -10,11 +10,12 @@ import { import { Router } from '@angular/router'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; + +import { ModalComponent } from '../modal.component'; import { TwoFactorOptionsComponent } from './two-factor-options.component'; -import { ModalComponent } from '../modal.component'; import { TwoFactorProviderType } from 'jslib/enums/twoFactorProviderType'; @@ -79,26 +80,26 @@ export class TwoFactorComponent implements OnInit { break; } - const challenges = JSON.parse(params['Challenges']); + const challenges = JSON.parse(params.Challenges); // TODO: init u2f break; case TwoFactorProviderType.Duo: setTimeout(() => { (window as any).Duo.init({ - host: params['Host'], - sig_request: params['Signature'], + host: params.Host, + sig_request: params.Signature, submit_callback: async (f: HTMLFormElement) => { const sig = f.querySelector('input[name="sig_response"]') as HTMLInputElement; if (sig != null) { this.token = sig.value; await this.submit(); } - } + }, }); }); break; case TwoFactorProviderType.Email: - this.twoFactorEmail = params['Email']; + this.twoFactorEmail = params.Email; if (this.authService.twoFactorProviders.size > 1) { await this.sendEmail(false); } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0b0ac37d29f..2860f323c9e 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,8 @@ +import { + ToasterConfig, + ToasterContainerComponent, +} from 'angular2-toaster'; import { Angulartics2GoogleAnalytics } from 'angulartics2/ga'; -import { ToasterContainerComponent, ToasterConfig } from 'angular2-toaster'; import { Component } from '@angular/core'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7d0c4371711..1e492927a29 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,39 +1,45 @@ import 'core-js'; import 'zone.js/dist/zone'; +import { ToasterModule } from 'angular2-toaster'; import { Angulartics2Module } from 'angulartics2'; import { Angulartics2GoogleAnalytics } from 'angulartics2/ga'; -import { AppRoutingModule } from './app-routing.module'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { FormsModule } from '@angular/forms'; -import { NgModule } from '@angular/core'; -import { ServicesModule } from './services/services.module'; -import { ToasterModule } from 'angular2-toaster'; -import { AddEditComponent } from './vault/add-edit.component'; -import { ApiActionDirective } from './directives/api-action.directive'; +import { AppRoutingModule } from './app-routing.module'; +import { ServicesModule } from './services/services.module'; + +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + import { AppComponent } from './app.component'; -import { AttachmentsComponent } from './vault/attachments.component'; +import { ModalComponent } from './modal.component'; + +import { EnvironmentComponent } from './accounts/environment.component'; +import { HintComponent } from './accounts/hint.component'; +import { LoginComponent } from './accounts/login.component'; +import { RegisterComponent } from './accounts/register.component'; +import { TwoFactorOptionsComponent } from './accounts/two-factor-options.component'; +import { TwoFactorComponent } from './accounts/two-factor.component'; + +import { ApiActionDirective } from './directives/api-action.directive'; import { AutofocusDirective } from './directives/autofocus.directive'; import { BlurClickDirective } from './directives/blur-click.directive'; import { BoxRowDirective } from './directives/box-row.directive'; -import { CiphersComponent } from './vault/ciphers.component'; -import { EnvironmentComponent } from './accounts/environment.component'; import { FallbackSrcDirective } from './directives/fallback-src.directive'; -import { FolderAddEditComponent } from './vault/folder-add-edit.component'; -import { GroupingsComponent } from './vault/groupings.component'; -import { HintComponent } from './accounts/hint.component'; -import { I18nPipe } from './pipes/i18n.pipe'; -import { IconComponent } from './vault/icon.component'; -import { LoginComponent } from './accounts/login.component'; -import { ModalComponent } from './modal.component'; -import { PasswordGeneratorComponent } from './vault/password-generator.component'; -import { RegisterComponent } from './accounts/register.component'; -import { SearchCiphersPipe } from './pipes/search-ciphers.pipe'; import { StopClickDirective } from './directives/stop-click.directive'; import { StopPropDirective } from './directives/stop-prop.directive'; -import { TwoFactorComponent } from './accounts/two-factor.component'; -import { TwoFactorOptionsComponent } from './accounts/two-factor-options.component'; + +import { I18nPipe } from './pipes/i18n.pipe'; +import { SearchCiphersPipe } from './pipes/search-ciphers.pipe'; + +import { AddEditComponent } from './vault/add-edit.component'; +import { AttachmentsComponent } from './vault/attachments.component'; +import { CiphersComponent } from './vault/ciphers.component'; +import { FolderAddEditComponent } from './vault/folder-add-edit.component'; +import { GroupingsComponent } from './vault/groupings.component'; +import { IconComponent } from './vault/icon.component'; +import { PasswordGeneratorComponent } from './vault/password-generator.component'; import { VaultComponent } from './vault/vault.component'; import { ViewComponent } from './vault/view.component'; diff --git a/src/app/directives/autofocus.directive.ts b/src/app/directives/autofocus.directive.ts index 07442d10603..dd708e5ae46 100644 --- a/src/app/directives/autofocus.directive.ts +++ b/src/app/directives/autofocus.directive.ts @@ -9,15 +9,15 @@ import { }) export class AutofocusDirective { @Input() set appAutofocus(condition: boolean | string) { - this._autofocus = condition === '' || condition === true; + this.autofocus = condition === '' || condition === true; } - private _autofocus: boolean; + private autofocus: boolean; constructor(private el: ElementRef) { } ngOnInit() { - if (this._autofocus) { + if (this.autofocus) { this.el.nativeElement.focus(); } } diff --git a/src/app/main.ts b/src/app/main.ts index 0de443196de..e9d6b197212 100644 --- a/src/app/main.ts +++ b/src/app/main.ts @@ -1,7 +1,9 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +// tslint:disable-next-line require('../scss/styles.scss'); +// tslint:disable-next-line require('../scripts/duo.js'); import { AppModule } from './app.module'; diff --git a/src/app/pipes/search-ciphers.pipe.ts b/src/app/pipes/search-ciphers.pipe.ts index 0c2dc2e0615..ca20167c40c 100644 --- a/src/app/pipes/search-ciphers.pipe.ts +++ b/src/app/pipes/search-ciphers.pipe.ts @@ -19,7 +19,7 @@ export class SearchCiphersPipe implements PipeTransform { } searchText = searchText.toLowerCase(); - return ciphers.filter(c => { + return ciphers.filter((c) => { if (c.name != null && c.name.toLowerCase().indexOf(searchText) > -1) { return true; } diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 35853594b9b..f2c9af94518 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -9,8 +9,8 @@ import { ToasterModule } from 'angular2-toaster'; import { DesktopMessagingService } from '../../services/desktopMessaging.service'; import { DesktopPlatformUtilsService } from '../../services/desktopPlatformUtils.service'; -import { DesktopStorageService } from '../../services/desktopStorage.service'; import { DesktopSecureStorageService } from '../../services/desktopSecureStorage.service'; +import { DesktopStorageService } from '../../services/desktopStorage.service'; import { I18nService } from '../../services/i18n.service'; import { ValidationService } from './validation.service'; @@ -102,12 +102,12 @@ environmentService.setUrlsFromStorage().then(() => { return syncService.fullSync(true); }); -function initFactory(i18n: I18nService, platformUtilsService: DesktopPlatformUtilsService): Function { +function initFactory(i18n: I18nService, platformUtils: DesktopPlatformUtilsService): Function { return async () => { await i18n.init(); await authService.init(); const htmlEl = window.document.documentElement; - htmlEl.classList.add('os_' + platformUtilsService.getDeviceString()); + htmlEl.classList.add('os_' + platformUtils.getDeviceString()); htmlEl.classList.add('locale_' + i18n.translationLocale); }; } @@ -136,7 +136,7 @@ function initFactory(i18n: I18nService, platformUtilsService: DesktopPlatformUti provide: APP_INITIALIZER, useFactory: initFactory, deps: [ - I18nServiceAbstraction, + I18nServiceAbstraction, PlatformUtilsServiceAbstraction, ], multi: true, diff --git a/src/app/vault/add-edit.component.ts b/src/app/vault/add-edit.component.ts index 075639aebb2..a69dcc55d08 100644 --- a/src/app/vault/add-edit.component.ts +++ b/src/app/vault/add-edit.component.ts @@ -8,8 +8,8 @@ import { Output, } from '@angular/core'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { CipherType } from 'jslib/enums/cipherType'; import { FieldType } from 'jslib/enums/fieldType'; @@ -144,7 +144,8 @@ export class AddEditComponent implements OnChanges { await this.formPromise; this.cipher.id = cipher.id; this.analytics.eventTrack.next({ action: this.editMode ? 'Edited Cipher' : 'Added Cipher' }); - this.toasterService.popAsync('success', null, this.i18nService.t(this.editMode ? 'editedItem' : 'addedItem')); + this.toasterService.popAsync('success', null, + this.i18nService.t(this.editMode ? 'editedItem' : 'addedItem')); this.onSavedCipher.emit(this.cipher); } catch { } } @@ -177,7 +178,7 @@ export class AddEditComponent implements OnChanges { async delete() { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('deleteItemConfirmation'), this.i18nService.t('deleteItem'), - this.i18nService.t('yes'), this.i18nService.t('no'), 'warning') + this.i18nService.t('yes'), this.i18nService.t('no'), 'warning'); if (!confirmed) { return; } @@ -195,7 +196,7 @@ export class AddEditComponent implements OnChanges { if (this.cipher.login != null && this.cipher.login.password != null && this.cipher.login.password.length) { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('overwritePasswordConfirmation'), this.i18nService.t('overwritePassword'), - this.i18nService.t('yes'), this.i18nService.t('no')) + this.i18nService.t('yes'), this.i18nService.t('no')); if (!confirmed) { return; } diff --git a/src/app/vault/attachments.component.ts b/src/app/vault/attachments.component.ts index 231a481d73c..ec3a56f49c9 100644 --- a/src/app/vault/attachments.component.ts +++ b/src/app/vault/attachments.component.ts @@ -8,8 +8,8 @@ import { Output, } from '@angular/core'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { CipherService } from 'jslib/abstractions/cipher.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; @@ -19,8 +19,8 @@ import { TokenService } from 'jslib/abstractions/token.service'; import { Cipher } from 'jslib/models/domain/cipher'; -import { CipherView } from 'jslib/models/view/cipherView'; import { AttachmentView } from 'jslib/models/view/attachmentView'; +import { CipherView } from 'jslib/models/view/cipherView'; @Component({ selector: 'app-vault-attachments', @@ -53,14 +53,14 @@ export class AttachmentsComponent implements OnInit { if (!this.canAccessAttachments) { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('premiumRequiredDesc'), this.i18nService.t('premiumRequired'), - this.i18nService.t('learnMore'), this.i18nService.t('cancel')) + this.i18nService.t('learnMore'), this.i18nService.t('cancel')); if (confirmed) { this.platformUtilsService.launchUri('https://vault.bitwarden.com/#/?premium=purchase'); } } else if (!this.hasUpdatedKey) { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('updateKey'), this.i18nService.t('featureUnavailable'), - this.i18nService.t('learnMore'), this.i18nService.t('cancel'), 'warning') + this.i18nService.t('learnMore'), this.i18nService.t('cancel'), 'warning'); if (confirmed) { this.platformUtilsService.launchUri('https://help.bitwarden.com/article/update-encryption-key/'); } @@ -110,7 +110,7 @@ export class AttachmentsComponent implements OnInit { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('deleteAttachmentConfirmation'), this.i18nService.t('deleteAttachment'), - this.i18nService.t('yes'), this.i18nService.t('no'), 'warning') + this.i18nService.t('yes'), this.i18nService.t('no'), 'warning'); if (!confirmed) { return; } diff --git a/src/app/vault/ciphers.component.ts b/src/app/vault/ciphers.component.ts index e38ca4748bc..8909c13ae58 100644 --- a/src/app/vault/ciphers.component.ts +++ b/src/app/vault/ciphers.component.ts @@ -7,10 +7,10 @@ import { Output, } from '@angular/core'; -import { CipherView } from 'jslib/models/view/cipherView'; - import { CipherService } from 'jslib/abstractions/cipher.service'; +import { CipherView } from 'jslib/models/view/cipherView'; + @Component({ selector: 'app-vault-ciphers', template: template, @@ -30,7 +30,7 @@ export class CiphersComponent { async load(filter: (cipher: CipherView) => boolean = null) { this.filter = filter; - let ciphers = await this.cipherService.getAllDecrypted(); + const ciphers = await this.cipherService.getAllDecrypted(); if (this.filter == null) { this.ciphers = ciphers; diff --git a/src/app/vault/folder-add-edit.component.ts b/src/app/vault/folder-add-edit.component.ts index 45ec6cbb65d..05e072b804a 100644 --- a/src/app/vault/folder-add-edit.component.ts +++ b/src/app/vault/folder-add-edit.component.ts @@ -8,8 +8,8 @@ import { Output, } from '@angular/core'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { FolderService } from 'jslib/abstractions/folder.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; @@ -58,7 +58,7 @@ export class FolderAddEditComponent implements OnInit { try { const folder = await this.folderService.encrypt(this.folder); - this.formPromise = this.folderService.saveWithServer(folder);; + this.formPromise = this.folderService.saveWithServer(folder); await this.formPromise; this.analytics.eventTrack.next({ action: this.editMode ? 'Edited Folder' : 'Added Folder' }); this.toasterService.popAsync('success', null, @@ -70,7 +70,7 @@ export class FolderAddEditComponent implements OnInit { async delete() { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('deleteFolderConfirmation'), this.i18nService.t('deleteFolder'), - this.i18nService.t('yes'), this.i18nService.t('no'), 'warning') + this.i18nService.t('yes'), this.i18nService.t('no'), 'warning'); if (!confirmed) { return; } diff --git a/src/app/vault/groupings.component.ts b/src/app/vault/groupings.component.ts index 172346ec55c..581c695c591 100644 --- a/src/app/vault/groupings.component.ts +++ b/src/app/vault/groupings.component.ts @@ -10,8 +10,8 @@ import { import { CipherType } from 'jslib/enums/cipherType'; -import { FolderView } from 'jslib/models/view/folderView'; import { CollectionView } from 'jslib/models/view/collectionView'; +import { FolderView } from 'jslib/models/view/folderView'; import { CollectionService } from 'jslib/abstractions/collection.service'; import { FolderService } from 'jslib/abstractions/folder.service'; diff --git a/src/app/vault/password-generator.component.ts b/src/app/vault/password-generator.component.ts index 2bf82b5e5c1..fad8dbad6c3 100644 --- a/src/app/vault/password-generator.component.ts +++ b/src/app/vault/password-generator.component.ts @@ -1,7 +1,7 @@ import * as template from './password-generator.component.html'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { Component, diff --git a/src/app/vault/vault.component.ts b/src/app/vault/vault.component.ts index 992aa88060e..0cdd289f210 100644 --- a/src/app/vault/vault.component.ts +++ b/src/app/vault/vault.component.ts @@ -1,5 +1,6 @@ import * as template from './vault.component.html'; +import { Location } from '@angular/common'; import { Component, ComponentFactoryResolver, @@ -7,21 +8,19 @@ import { ViewChild, ViewContainerRef, } from '@angular/core'; - import { ActivatedRoute, Router, } from '@angular/router'; -import { Location } from '@angular/common'; +import { ModalComponent } from '../modal.component'; -import { AttachmentsComponent } from './attachments.component'; import { AddEditComponent } from './add-edit.component'; +import { AttachmentsComponent } from './attachments.component'; import { CiphersComponent } from './ciphers.component'; import { FolderAddEditComponent } from './folder-add-edit.component'; import { GroupingsComponent } from './groupings.component'; import { PasswordGeneratorComponent } from './password-generator.component'; -import { ModalComponent } from '../modal.component'; import { CipherType } from 'jslib/enums/cipherType'; @@ -56,32 +55,32 @@ export class VaultComponent implements OnInit { async ngOnInit() { this.route.queryParams.subscribe(async (params) => { - if (params['cipherId']) { + if (params.cipherId) { const cipherView = new CipherView(); - cipherView.id = params['cipherId']; - if (params['action'] === 'edit') { + cipherView.id = params.cipherId; + if (params.action === 'edit') { this.editCipher(cipherView); } else { this.viewCipher(cipherView); } - } else if (params['action'] === 'add') { + } else if (params.action === 'add') { this.addCipher(); } - if (params['favorites']) { + if (params.favorites) { this.groupingsComponent.selectedFavorites = true; await this.filterFavorites(); - } else if (params['type']) { - const t = parseInt(params['type']); + } else if (params.type) { + const t = parseInt(params.type, null); this.groupingsComponent.selectedType = t; await this.filterCipherType(t); - } else if (params['folderId']) { + } else if (params.folderId) { this.groupingsComponent.selectedFolder = true; - this.groupingsComponent.selectedFolderId = params['folderId']; - await this.filterFolder(params['folderId']); - } else if (params['collectionId']) { - this.groupingsComponent.selectedCollectionId = params['collectionId']; - await this.filterCollection(params['collectionId']); + this.groupingsComponent.selectedFolderId = params.folderId; + await this.filterFolder(params.folderId); + } else if (params.collectionId) { + this.groupingsComponent.selectedCollectionId = params.collectionId; + await this.filterCollection(params.collectionId); } else { this.groupingsComponent.selectedAll = true; await this.ciphersComponent.load(); diff --git a/src/app/vault/view.component.ts b/src/app/vault/view.component.ts index 8fb65a25bf1..6eccee71d61 100644 --- a/src/app/vault/view.component.ts +++ b/src/app/vault/view.component.ts @@ -9,8 +9,8 @@ import { Output, } from '@angular/core'; -import { Angulartics2 } from 'angulartics2'; import { ToasterService } from 'angular2-toaster'; +import { Angulartics2 } from 'angulartics2'; import { CipherType } from 'jslib/enums/cipherType'; import { FieldType } from 'jslib/enums/fieldType'; diff --git a/src/services/desktopStorage.service.ts b/src/services/desktopStorage.service.ts index bdfe793afd0..557b5d2fd08 100644 --- a/src/services/desktopStorage.service.ts +++ b/src/services/desktopStorage.service.ts @@ -1,5 +1,6 @@ import { StorageService } from 'jslib/abstractions'; +// tslint:disable-next-line const Store = require('electron-store'); const store = new Store(); diff --git a/webpack.renderer.js b/webpack.renderer.js index e9aa03df883..ff1279b7013 100644 --- a/webpack.renderer.js +++ b/webpack.renderer.js @@ -116,6 +116,11 @@ const renderer = { path: 'fonts/', filename: 'css/fonts.css' }), + // ref: https://github.com/angular/angular/issues/20357 + new webpack.ContextReplacementPlugin( + /\@angular(\\|\/)core(\\|\/)esm5/, + path.resolve(__dirname, './src') + ), new webpack.optimize.CommonsChunkPlugin({ name: 'app/vendor', chunks: ['app/main'],