diff --git a/electron/src/components/keymap/edit/keymap-edit.component.ts b/electron/src/components/keymap/edit/keymap-edit.component.ts index 124f0e0a..089fc132 100644 --- a/electron/src/components/keymap/edit/keymap-edit.component.ts +++ b/electron/src/components/keymap/edit/keymap-edit.component.ts @@ -67,7 +67,7 @@ export class KeymapEditComponent extends SharedKeymapEditComponent { .do(response => console.log('Sending layer finished', response)) .switchMap(() => this.uhkDevice.applyConfig()) .subscribe( - (response) => console.log('Applying layer finished', response), + response => console.log('Applying layer finished', response), error => console.error('Error during uploading layer', error), () => console.log('Layer has been sucessfully uploaded') ); @@ -85,7 +85,7 @@ export class KeymapEditComponent extends SharedKeymapEditComponent { .do(response => console.log('Sending keymap finished', response)) .switchMap(() => this.uhkDevice.applyConfig()) .subscribe( - (response) => console.log('Applying keymap finished', response), + response => console.log('Applying keymap finished', response), error => console.error('Error during uploading keymap', error), () => console.log('Keymap has been sucessfully uploaded') ); diff --git a/electron/src/electron-main.ts b/electron/src/electron-main.ts index c2a2c566..c0c892c5 100644 --- a/electron/src/electron-main.ts +++ b/electron/src/electron-main.ts @@ -24,7 +24,7 @@ function createWindow() { win.loadURL(`file://${indexPath}`); - win.on('page-title-updated', (event) => { + win.on('page-title-updated', event => { event.preventDefault(); }); diff --git a/electron/src/main-app/main-app.component.ts b/electron/src/main-app/main-app.component.ts index 8f6bf739..0eb7bf9d 100644 --- a/electron/src/main-app/main-app.component.ts +++ b/electron/src/main-app/main-app.component.ts @@ -54,7 +54,7 @@ export class MainAppComponent { .do(response => console.log('Sending user configuration finished', response)) .switchMap(() => this.uhkDevice.applyConfig()) .subscribe( - (response) => console.log('Applying user configuration finished', response), + response => console.log('Applying user configuration finished', response), error => console.error('Error during uploading user configuration', error), () => console.log('User configuration has been sucessfully uploaded') ); diff --git a/electron/src/services/uhk-device.service.ts b/electron/src/services/uhk-device.service.ts index 1232b863..e3524cd2 100644 --- a/electron/src/services/uhk-device.service.ts +++ b/electron/src/services/uhk-device.service.ts @@ -115,7 +115,7 @@ export class UhkDeviceService implements OnDestroy { const outSending = this.messageOut$.concatMap(senderPackage => { return (>Observable.create((subscriber: Subscriber) => { console.log('transfering', senderPackage.buffer); - outEndPoint.transfer(senderPackage.buffer, (error) => { + outEndPoint.transfer(senderPackage.buffer, error => { if (error) { console.error('transfering errored', error); subscriber.error(error); diff --git a/shared/src/components/add-on/add-on.component.ts b/shared/src/components/add-on/add-on.component.ts index e76aea84..c0dca86a 100644 --- a/shared/src/components/add-on/add-on.component.ts +++ b/shared/src/components/add-on/add-on.component.ts @@ -12,9 +12,9 @@ import { Observable } from 'rxjs/Observable'; } }) export class AddOnComponent { - private name$: Observable; + name$: Observable; - constructor(private route: ActivatedRoute) { + constructor(route: ActivatedRoute) { this.name$ = route .params .select('name'); diff --git a/shared/src/components/keymap/edit/keymap-edit.component.ts b/shared/src/components/keymap/edit/keymap-edit.component.ts index 2bf948bf..4ef7a2e5 100644 --- a/shared/src/components/keymap/edit/keymap-edit.component.ts +++ b/shared/src/components/keymap/edit/keymap-edit.component.ts @@ -32,7 +32,7 @@ export class KeymapEditComponent { constructor( protected store: Store, - private route: ActivatedRoute + route: ActivatedRoute ) { this.keymap$ = route .params diff --git a/shared/src/components/macro/action-editor/macro-action-editor.component.ts b/shared/src/components/macro/action-editor/macro-action-editor.component.ts index d0124160..77c5f82b 100644 --- a/shared/src/components/macro/action-editor/macro-action-editor.component.ts +++ b/shared/src/components/macro/action-editor/macro-action-editor.component.ts @@ -29,18 +29,16 @@ export class MacroActionEditorComponent implements OnInit { @ViewChild('tab') selectedTab: any; - private editableMacroAction: EditableMacroAction; - private activeTab: TabName; + editableMacroAction: EditableMacroAction; + activeTab: TabName; /* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */ - /* tslint:disable:no-unused-variable: It is used in the template. */ - private TabName = TabName; - /* tslint:enable:no-unused-variable */ + TabName = TabName; /* tslint:enable:variable-name */ ngOnInit() { - let macroAction: MacroAction = this.macroAction ? this.macroAction : new TextMacroAction(); + const macroAction: MacroAction = this.macroAction ? this.macroAction : new TextMacroAction(); this.editableMacroAction = new EditableMacroAction(macroAction.toJsonObject()); - let tab: TabName = this.getTabName(this.editableMacroAction); + const tab: TabName = this.getTabName(this.editableMacroAction); this.activeTab = tab; } diff --git a/shared/src/components/macro/action-editor/tab/delay/macro-delay.component.ts b/shared/src/components/macro/action-editor/tab/delay/macro-delay.component.ts index 1dce0c8f..0d779e52 100644 --- a/shared/src/components/macro/action-editor/tab/delay/macro-delay.component.ts +++ b/shared/src/components/macro/action-editor/tab/delay/macro-delay.component.ts @@ -22,10 +22,8 @@ export class MacroDelayTabComponent implements OnInit { @Input() macroAction: EditableMacroAction; @ViewChild('macroDelayInput') input: ElementRef; - private delay: number; - /* tslint:disable:no-unused-variable: It is used in the template. */ - private presets: number[] = [0.3, 0.5, 0.8, 1, 2, 3, 4, 5]; - /* tslint:enable:no-unused-variable */ + delay: number; + presets: number[] = [0.3, 0.5, 0.8, 1, 2, 3, 4, 5]; constructor() { } diff --git a/shared/src/components/macro/action-editor/tab/key/macro-key.component.ts b/shared/src/components/macro/action-editor/tab/key/macro-key.component.ts index bf1fc7a1..5d980cd9 100644 --- a/shared/src/components/macro/action-editor/tab/key/macro-key.component.ts +++ b/shared/src/components/macro/action-editor/tab/key/macro-key.component.ts @@ -25,14 +25,11 @@ export class MacroKeyTabComponent implements OnInit { @ViewChild('tab') selectedTab: Tab; @ViewChild('keypressTab') keypressTab: KeypressTabComponent; - private defaultKeyAction: KeyAction; - - private activeTab: TabName; /* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */ - /* tslint:disable:no-unused-variable: It is used in the template. */ - private TabName = TabName; - /* tslint:enable:no-unused-variable */ + TabName = TabName; /* tslint:enable:variable-name */ + activeTab: TabName; + defaultKeyAction: KeyAction; ngOnInit() { this.defaultKeyAction = this.macroAction.toKeystrokeAction(); diff --git a/shared/src/components/macro/action-editor/tab/mouse/macro-mouse.component.ts b/shared/src/components/macro/action-editor/tab/mouse/macro-mouse.component.ts index 163570ed..7f5691d6 100644 --- a/shared/src/components/macro/action-editor/tab/mouse/macro-mouse.component.ts +++ b/shared/src/components/macro/action-editor/tab/mouse/macro-mouse.component.ts @@ -24,14 +24,12 @@ export class MacroMouseTabComponent implements OnInit { @Input() macroAction: EditableMacroAction; @ViewChild('tab') selectedTab: Tab; + /* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */ + TabName = TabName; + /* tslint:enable:variable-name */ private activeTab: TabName; private buttonLabels: string[]; private selectedButtons: boolean[]; - /* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */ - /* tslint:disable:no-unused-variable: It is used in the template. */ - private TabName = TabName; - /* tslint:enable:no-unused-variable */ - /* tslint:enable:variable-name */ constructor() { this.buttonLabels = ['Left', 'Middle', 'Right']; diff --git a/shared/src/components/macro/item/macro-item.component.ts b/shared/src/components/macro/item/macro-item.component.ts index 3069e203..51422cea 100644 --- a/shared/src/components/macro/item/macro-item.component.ts +++ b/shared/src/components/macro/item/macro-item.component.ts @@ -106,12 +106,12 @@ export class MacroItemComponent implements OnInit, OnChanges { } else if (this.macroAction instanceof DelayMacroAction) { // Delay this.iconName = 'clock'; - let action: DelayMacroAction = this.macroAction as DelayMacroAction; + const action: DelayMacroAction = this.macroAction as DelayMacroAction; const delay = action.delay > 0 ? action.delay / 1000 : 0; this.title = `Delay of ${delay}s`; } else if (this.macroAction instanceof TextMacroAction) { // Write text - let action: TextMacroAction = this.macroAction as TextMacroAction; + const action: TextMacroAction = this.macroAction as TextMacroAction; this.iconName = 'font'; this.title = `Write text: ${action.text}`; } else if (this.macroAction instanceof KeyMacroAction) { diff --git a/shared/src/components/macro/list/macro-list.component.ts b/shared/src/components/macro/list/macro-list.component.ts index 8ff5bc0e..06224bcd 100644 --- a/shared/src/components/macro/list/macro-list.component.ts +++ b/shared/src/components/macro/list/macro-list.component.ts @@ -60,7 +60,7 @@ export class MacroListComponent { private dragIndex: number; private showNew: boolean = false; - constructor(private dragulaService: DragulaService) { + constructor(dragulaService: DragulaService) { /* tslint:disable:no-unused-variable: Used by Dragula. */ dragulaService.setOptions('macroActions', { moves: function (el: any, container: any, handle: any) { diff --git a/shared/src/components/popover/popover.component.ts b/shared/src/components/popover/popover.component.ts index 59574bbc..2731cdff 100644 --- a/shared/src/components/popover/popover.component.ts +++ b/shared/src/components/popover/popover.component.ts @@ -90,7 +90,7 @@ export class PopoverComponent implements OnChanges { private leftPosition: number = 0; private animationState: string; - constructor(private store: Store) { + constructor(store: Store) { this.animationState = 'closed'; this.keymaps$ = store.let(getKeymaps()) .map((keymaps: Keymap[]) => @@ -139,7 +139,7 @@ export class PopoverComponent implements OnChanges { onRemapKey(): void { if (this.keyActionValid) { try { - let keyAction = this.selectedTab.toKeyAction(); + const keyAction = this.selectedTab.toKeyAction(); this.remap.emit(keyAction); } catch (e) { // TODO: show error dialog diff --git a/shared/src/components/popover/tab/keymap/keymap-tab.component.ts b/shared/src/components/popover/tab/keymap/keymap-tab.component.ts index abb7d5a8..089801eb 100644 --- a/shared/src/components/popover/tab/keymap/keymap-tab.component.ts +++ b/shared/src/components/popover/tab/keymap/keymap-tab.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core'; import { Select2OptionData } from 'ng2-select2/ng2-select2'; diff --git a/shared/src/components/popover/tab/keypress/keypress-tab.component.ts b/shared/src/components/popover/tab/keypress/keypress-tab.component.ts index b82d01aa..ec989cb0 100644 --- a/shared/src/components/popover/tab/keypress/keypress-tab.component.ts +++ b/shared/src/components/popover/tab/keypress/keypress-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, EventEmitter, OnChanges, Output } from '@angular/core'; +import { Component, Input, OnChanges } from '@angular/core'; import { Select2OptionData, Select2TemplateFunction } from 'ng2-select2'; @@ -86,11 +86,11 @@ export class KeypressTabComponent extends Tab implements OnChanges { if (!(keyAction instanceof KeystrokeAction)) { return false; } - let keystrokeAction: KeystrokeAction = keyAction; + const keystrokeAction: KeystrokeAction = keyAction; // Restore scancode this.scanCode = keystrokeAction.scancode || 0; - let leftModifiersLength: number = this.leftModifiers.length; + const leftModifiersLength: number = this.leftModifiers.length; // Restore modifiers for (let i = 0; i < leftModifiersLength; ++i) { @@ -98,7 +98,7 @@ export class KeypressTabComponent extends Tab implements OnChanges { } for (let i = leftModifiersLength; i < leftModifiersLength + this.rightModifierSelects.length; ++i) { - let index: number = this.mapper.modifierMapper(i) - leftModifiersLength; + const index: number = this.mapper.modifierMapper(i) - leftModifiersLength; this.rightModifierSelects[index] = ((keystrokeAction.modifierMask >> i) & 1) === 1; } @@ -111,11 +111,11 @@ export class KeypressTabComponent extends Tab implements OnChanges { } toKeyAction(): KeystrokeAction { - let keystrokeAction: KeystrokeAction = new KeystrokeAction(); + const keystrokeAction: KeystrokeAction = new KeystrokeAction(); keystrokeAction.scancode = this.scanCode; keystrokeAction.modifierMask = 0; - let modifiers = this.leftModifierSelects.concat(this.rightModifierSelects).map(x => x ? 1 : 0); + const modifiers = this.leftModifierSelects.concat(this.rightModifierSelects).map(x => x ? 1 : 0); for (let i = 0; i < modifiers.length; ++i) { keystrokeAction.modifierMask |= modifiers[i] << this.mapper.modifierMapper(i); } @@ -149,7 +149,7 @@ export class KeypressTabComponent extends Tab implements OnChanges { } toggleModifier(right: boolean, index: number) { - let modifierSelects: boolean[] = right ? this.rightModifierSelects : this.leftModifierSelects; + const modifierSelects: boolean[] = right ? this.rightModifierSelects : this.leftModifierSelects; modifierSelects[index] = !modifierSelects[index]; this.validAction.emit(this.keyActionValid()); diff --git a/shared/src/components/popover/tab/layer/layer-tab.component.ts b/shared/src/components/popover/tab/layer/layer-tab.component.ts index 636d7f42..6fa81af4 100644 --- a/shared/src/components/popover/tab/layer/layer-tab.component.ts +++ b/shared/src/components/popover/tab/layer/layer-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, HostBinding, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; +import { Component, HostBinding, Input, OnChanges, SimpleChanges } from '@angular/core'; import { KeyAction, LayerName, SwitchLayerAction } from '../../../../config-serializer/config-items/key-action'; @@ -71,14 +71,14 @@ export class LayerTabComponent extends Tab implements OnChanges { return false; } - let switchLayerAction: SwitchLayerAction = keyAction; + const switchLayerAction: SwitchLayerAction = keyAction; this.toggle = switchLayerAction.isLayerToggleable; this.layer = switchLayerAction.layer; return true; } toKeyAction(): SwitchLayerAction { - let keyAction = new SwitchLayerAction(); + const keyAction = new SwitchLayerAction(); keyAction.isLayerToggleable = this.toggle; keyAction.layer = this.layer; if (!this.keyActionValid()) { diff --git a/shared/src/components/popover/tab/macro/macro-tab.component.ts b/shared/src/components/popover/tab/macro/macro-tab.component.ts index 8f0d1a34..cac6c417 100644 --- a/shared/src/components/popover/tab/macro/macro-tab.component.ts +++ b/shared/src/components/popover/tab/macro/macro-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core'; +import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { Store } from '@ngrx/store'; @@ -27,7 +27,7 @@ export class MacroTabComponent extends Tab implements OnInit, OnChanges, OnDestr private selectedMacroIndex: number; private subscription: Subscription; - constructor(private store: Store) { + constructor(store: Store) { super(); this.subscription = store.let(getMacros()) .subscribe((macros: Macro[]) => this.macros = macros); diff --git a/shared/src/components/popover/tab/mouse/mouse-tab.component.ts b/shared/src/components/popover/tab/mouse/mouse-tab.component.ts index 9a4f7c7b..267ae4c6 100644 --- a/shared/src/components/popover/tab/mouse/mouse-tab.component.ts +++ b/shared/src/components/popover/tab/mouse/mouse-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; +import { Component, Input, OnChanges } from '@angular/core'; import { KeyAction, MouseAction, MouseActionParam } from '../../../../config-serializer/config-items/key-action'; import { Tab } from '../tab'; @@ -11,14 +11,12 @@ import { Tab } from '../tab'; export class MouseTabComponent extends Tab implements OnChanges { @Input() defaultKeyAction: KeyAction; - private mouseActionParam: MouseActionParam; - private selectedPageIndex: number; /* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */ - /* tslint:disable:no-unused-variable: It is used in the template. */ - private MouseActionParam = MouseActionParam; - /* tslint:enable:no-unused-variable tslint:enable:variable-name */ - - private pages: string[]; + MouseActionParam = MouseActionParam; + /* tslint:enable:variable-name*/ + mouseActionParam: MouseActionParam; + selectedPageIndex: number; + pages: string[]; constructor() { super(); @@ -40,7 +38,7 @@ export class MouseTabComponent extends Tab implements OnChanges { return false; } - let mouseAction: MouseAction = keyAction; + const mouseAction: MouseAction = keyAction; this.mouseActionParam = mouseAction.mouseAction; if (mouseAction.mouseAction === MouseActionParam.moveUp) { @@ -77,7 +75,7 @@ export class MouseTabComponent extends Tab implements OnChanges { } toKeyAction(): MouseAction { - let mouseAction: MouseAction = new MouseAction(); + const mouseAction: MouseAction = new MouseAction(); mouseAction.mouseAction = this.mouseActionParam; return mouseAction; } diff --git a/shared/src/components/popover/tab/none/none-tab.component.ts b/shared/src/components/popover/tab/none/none-tab.component.ts index 3bdb9b62..5a3caa6b 100644 --- a/shared/src/components/popover/tab/none/none-tab.component.ts +++ b/shared/src/components/popover/tab/none/none-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, OnChanges, Output } from '@angular/core'; +import { Component, OnChanges } from '@angular/core'; import { Tab } from '../tab'; diff --git a/shared/src/components/side-menu/side-menu.component.ts b/shared/src/components/side-menu/side-menu.component.ts index ff39b84e..9aae64f3 100644 --- a/shared/src/components/side-menu/side-menu.component.ts +++ b/shared/src/components/side-menu/side-menu.component.ts @@ -56,7 +56,7 @@ export class SideMenuComponent { } toggleHide(event: Event, type: string) { - let header: DOMTokenList = (event.target).classList; + const header: DOMTokenList = (event.target).classList; let show = false; if (header.contains('fa-chevron-down')) { diff --git a/shared/src/components/svg/keyboard/svg-keyboard.component.ts b/shared/src/components/svg/keyboard/svg-keyboard.component.ts index edfa7fe6..682d2f66 100644 --- a/shared/src/components/svg/keyboard/svg-keyboard.component.ts +++ b/shared/src/components/svg/keyboard/svg-keyboard.component.ts @@ -55,7 +55,7 @@ export class SvgKeyboardComponent implements OnInit { } private getKeyboardSvgAttributes(): { viewBox: string, transform: string, fill: string } { - let svg: any = this.getBaseLayer(); + const svg: any = this.getBaseLayer(); return { viewBox: svg.$.viewBox, transform: svg.g[0].$.transform, @@ -64,7 +64,7 @@ export class SvgKeyboardComponent implements OnInit { } private getSvgModules(): SvgModule[] { - let modules = this.getBaseLayer().g[0].g.map((obj: any) => new SvgModule(obj)); + const modules = this.getBaseLayer().g[0].g.map((obj: any) => new SvgModule(obj)); return [modules[1], modules[0]]; // TODO: remove if the svg will be correct } diff --git a/shared/src/components/svg/keys/svg-keyboard-key/svg-keyboard-key.component.ts b/shared/src/components/svg/keys/svg-keyboard-key/svg-keyboard-key.component.ts index 83fec9e4..4142ef87 100644 --- a/shared/src/components/svg/keys/svg-keyboard-key/svg-keyboard-key.component.ts +++ b/shared/src/components/svg/keys/svg-keyboard-key/svg-keyboard-key.component.ts @@ -141,7 +141,7 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy { constructor( private mapper: MapperService, - private store: Store, + store: Store, private element: ElementRef, private captureService: CaptureService, private renderer: Renderer @@ -215,11 +215,11 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy { this.labelType = LabelTypes.OneLineText; if (this.keyAction instanceof KeystrokeAction) { - let keyAction: KeystrokeAction = this.keyAction as KeystrokeAction; + const keyAction: KeystrokeAction = this.keyAction as KeystrokeAction; let newLabelSource: string[]; if (!keyAction.hasActiveModifier() && keyAction.hasScancode()) { - let scancode: number = keyAction.scancode; + const scancode: number = keyAction.scancode; newLabelSource = this.mapper.scanCodeToText(scancode); if (this.mapper.hasScancodeIcon(scancode)) { this.labelSource = this.mapper.scanCodeToSvgImagePath(scancode); @@ -262,7 +262,7 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy { this.labelSource = this.keyAction; } } else if (this.keyAction instanceof SwitchLayerAction) { - let keyAction: SwitchLayerAction = this.keyAction as SwitchLayerAction; + const keyAction: SwitchLayerAction = this.keyAction as SwitchLayerAction; let newLabelSource: string; switch (keyAction.layer) { case LayerName.mod: @@ -289,11 +289,11 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy { this.labelSource = newLabelSource; } } else if (this.keyAction instanceof SwitchKeymapAction) { - let keyAction: SwitchKeymapAction = this.keyAction as SwitchKeymapAction; + const keyAction: SwitchKeymapAction = this.keyAction as SwitchKeymapAction; this.labelType = LabelTypes.SwitchKeymap; this.labelSource = keyAction.keymapAbbreviation; } else if (this.keyAction instanceof PlayMacroAction) { - let keyAction: PlayMacroAction = this.keyAction as PlayMacroAction; + const keyAction: PlayMacroAction = this.keyAction as PlayMacroAction; const macro: Macro = this.macros.find((_macro: Macro) => _macro.id === keyAction.macroId); this.labelType = LabelTypes.IconText; this.labelSource = { diff --git a/shared/src/components/svg/keys/svg-keystroke-key/svg-keystroke-key.component.ts b/shared/src/components/svg/keys/svg-keystroke-key/svg-keystroke-key.component.ts index 36282e34..4d83ea0b 100644 --- a/shared/src/components/svg/keys/svg-keystroke-key/svg-keystroke-key.component.ts +++ b/shared/src/components/svg/keys/svg-keystroke-key/svg-keystroke-key.component.ts @@ -20,10 +20,6 @@ class SvgAttributes { } } -enum Modifiers { - Shift, Control, Alt, Command -} - @Component({ selector: 'g[svg-keystroke-key]', templateUrl: './svg-keystroke-key.component.html', @@ -68,7 +64,7 @@ export class SvgKeystrokeKeyComponent implements OnInit, OnChanges { this.modifierIconNames.option = this.mapper.getIcon('option'); this.modifierIconNames.command = this.mapper.getIcon('command'); - let bottomSideMode: boolean = this.width < this.height * 1.8; + const bottomSideMode: boolean = this.width < this.height * 1.8; const heightWidthRatio = this.height / this.width; @@ -76,8 +72,8 @@ export class SvgKeystrokeKeyComponent implements OnInit, OnChanges { const maxIconWidth = this.width / 4; const maxIconHeight = this.height; const iconScalingFactor = 0.8; - let iconWidth = iconScalingFactor * heightWidthRatio * maxIconWidth; - let iconHeight = iconScalingFactor * maxIconHeight; + const iconWidth = iconScalingFactor * heightWidthRatio * maxIconWidth; + const iconHeight = iconScalingFactor * maxIconHeight; this.modifierContainer.width = this.width; this.modifierContainer.height = this.height / 5; this.modifierContainer.y = this.height - this.modifierContainer.height; @@ -134,7 +130,7 @@ export class SvgKeystrokeKeyComponent implements OnInit, OnChanges { ngOnChanges() { let newLabelSource: string[]; if (this.keystrokeAction.hasScancode()) { - let scancode: number = this.keystrokeAction.scancode; + const scancode: number = this.keystrokeAction.scancode; newLabelSource = this.mapper.scanCodeToText(scancode); if (newLabelSource) { if (newLabelSource.length === 1) { diff --git a/shared/src/components/svg/wrap/svg-keyboard-wrap.component.ts b/shared/src/components/svg/wrap/svg-keyboard-wrap.component.ts index 35005051..b22d4e09 100644 --- a/shared/src/components/svg/wrap/svg-keyboard-wrap.component.ts +++ b/shared/src/components/svg/wrap/svg-keyboard-wrap.component.ts @@ -155,7 +155,7 @@ export class SvgKeyboardWrapComponent implements OnInit, OnChanges { } onCapture(moduleId: number, keyId: number, captured: { code: number, left: boolean[], right: boolean[] }): void { - let keystrokeAction: KeystrokeAction = new KeystrokeAction(); + const keystrokeAction: KeystrokeAction = new KeystrokeAction(); const modifiers = captured.left.concat(captured.right).map(x => x ? 1 : 0); keystrokeAction.scancode = captured.code; diff --git a/shared/src/config-serializer/UhkBuffer.ts b/shared/src/config-serializer/UhkBuffer.ts index a157bdb8..6176b14d 100644 --- a/shared/src/config-serializer/UhkBuffer.ts +++ b/shared/src/config-serializer/UhkBuffer.ts @@ -24,7 +24,7 @@ export class UhkBuffer { } readInt8(): number { - let value = this.buffer.readInt8(this.offset); + const value = this.buffer.readInt8(this.offset); this.dump(`i8(${value})`); this.bytesToBacktrack = 1; this.offset += this.bytesToBacktrack; @@ -38,7 +38,7 @@ export class UhkBuffer { } readUInt8(): number { - let value = this.buffer.readUInt8(this.offset); + const value = this.buffer.readUInt8(this.offset); this.dump(`u8(${value})`); this.bytesToBacktrack = 1; this.offset += this.bytesToBacktrack; @@ -52,7 +52,7 @@ export class UhkBuffer { } readInt16(): number { - let value = this.buffer.readInt16LE(this.offset); + const value = this.buffer.readInt16LE(this.offset); this.dump(`i16(${value})`); this.bytesToBacktrack = 2; this.offset += this.bytesToBacktrack; @@ -66,7 +66,7 @@ export class UhkBuffer { } readUInt16(): number { - let value = this.buffer.readUInt16LE(this.offset); + const value = this.buffer.readUInt16LE(this.offset); this.dump(`u16(${value})`); this.bytesToBacktrack = 2; this.offset += this.bytesToBacktrack; @@ -80,7 +80,7 @@ export class UhkBuffer { } readInt32(): number { - let value = this.buffer.readInt32LE(this.offset); + const value = this.buffer.readInt32LE(this.offset); this.dump(`i32(${value})`); this.bytesToBacktrack = 4; this.offset += this.bytesToBacktrack; @@ -94,7 +94,7 @@ export class UhkBuffer { } readUInt32(): number { - let value = this.buffer.readUInt32LE(this.offset); + const value = this.buffer.readUInt32LE(this.offset); this.dump(`u32(${value})`); this.bytesToBacktrack = 4; this.offset += this.bytesToBacktrack; @@ -125,8 +125,8 @@ export class UhkBuffer { } readString(): string { - let stringByteLength = this.readCompactLength(); - let str = this.buffer.toString(UhkBuffer.stringEncoding, this.offset, this.offset + stringByteLength); + const stringByteLength = this.readCompactLength(); + const str = this.buffer.toString(UhkBuffer.stringEncoding, this.offset, this.offset + stringByteLength); this.dump(`${UhkBuffer.stringEncoding}(${str})`); this.bytesToBacktrack = stringByteLength; this.offset += stringByteLength; @@ -134,7 +134,7 @@ export class UhkBuffer { } writeString(str: string): void { - let stringByteLength = Buffer.byteLength(str, UhkBuffer.stringEncoding); + const stringByteLength = Buffer.byteLength(str, UhkBuffer.stringEncoding); if (stringByteLength > UhkBuffer.maxCompactLength) { throw `Cannot serialize string: ${stringByteLength} bytes is larger @@ -156,8 +156,8 @@ export class UhkBuffer { } readArray(elementReader: (buffer: UhkBuffer, index?: number) => T): T[] { - let array: T[] = []; - let length = this.readCompactLength(); + const array: T[] = []; + const length = this.readCompactLength(); for (let i = 0; i < length; ++i) { array.push(elementReader(this, i)); } diff --git a/shared/src/config-serializer/config-items/Layer.ts b/shared/src/config-serializer/config-items/Layer.ts index 72c91e40..a174bd44 100644 --- a/shared/src/config-serializer/config-items/Layer.ts +++ b/shared/src/config-serializer/config-items/Layer.ts @@ -1,5 +1,4 @@ import { UhkBuffer } from '../UhkBuffer'; -import { Keymap } from './Keymap'; import { Macro } from './Macro'; import { Module } from './Module'; diff --git a/shared/src/config-serializer/config-items/Macro.ts b/shared/src/config-serializer/config-items/Macro.ts index f4a90efe..f151818e 100644 --- a/shared/src/config-serializer/config-items/Macro.ts +++ b/shared/src/config-serializer/config-items/Macro.ts @@ -38,7 +38,7 @@ export class Macro { this.isLooped = buffer.readBoolean(); this.isPrivate = buffer.readBoolean(); this.name = buffer.readString(); - let macroActionsLength: number = buffer.readCompactLength(); + const macroActionsLength: number = buffer.readCompactLength(); this.macroActions = []; for (let i = 0; i < macroActionsLength; ++i) { this.macroActions.push(MacroActionHelper.createMacroAction(buffer)); diff --git a/shared/src/config-serializer/config-items/Module.ts b/shared/src/config-serializer/config-items/Module.ts index a7ce6e72..9415a7e8 100644 --- a/shared/src/config-serializer/config-items/Module.ts +++ b/shared/src/config-serializer/config-items/Module.ts @@ -1,7 +1,6 @@ import { assertEnum, assertUInt8 } from '../assert'; import { UhkBuffer } from '../UhkBuffer'; import { Helper as KeyActionHelper, KeyAction, NoneAction } from './key-action'; -import { Keymap } from './Keymap'; import { Macro } from './Macro'; import { PlayMacroAction, SwitchLayerAction } from './key-action'; @@ -42,7 +41,7 @@ export class Module { fromBinary(buffer: UhkBuffer, macros?: Macro[]): Module { this.id = buffer.readUInt8(); this.pointerRole = buffer.readUInt8(); - let keyActionsLength: number = buffer.readCompactLength(); + const keyActionsLength: number = buffer.readCompactLength(); this.keyActions = []; for (let i = 0; i < keyActionsLength; ++i) { this.keyActions.push(KeyActionHelper.createKeyAction(buffer, macros)); diff --git a/shared/src/config-serializer/config-items/key-action/KeyAction.ts b/shared/src/config-serializer/config-items/key-action/KeyAction.ts index 17679b93..2f0d43e8 100644 --- a/shared/src/config-serializer/config-items/key-action/KeyAction.ts +++ b/shared/src/config-serializer/config-items/key-action/KeyAction.ts @@ -32,17 +32,17 @@ export let keyActionType = { export abstract class KeyAction { assertKeyActionType(jsObject: any): void { - let keyActionClassname: string = this.constructor.name; - let keyActionTypeString: string = keyActionType[keyActionClassname]; + const keyActionClassname: string = this.constructor.name; + const keyActionTypeString: string = keyActionType[keyActionClassname]; if (jsObject.keyActionType !== keyActionTypeString) { throw `Invalid ${keyActionClassname}.keyActionType: ${jsObject.keyActionType}`; } } readAndAssertKeyActionId(buffer: UhkBuffer): KeyActionId { - let classname: string = this.constructor.name; - let readKeyActionId: number = buffer.readUInt8(); - let keyActionId: number = KeyActionId[classname]; + const classname: string = this.constructor.name; + const readKeyActionId: number = buffer.readUInt8(); + const keyActionId: number = KeyActionId[classname]; if (keyActionId === KeyActionId.KeystrokeAction) { if (readKeyActionId < KeyActionId.KeystrokeAction || readKeyActionId > KeyActionId.LastKeystrokeAction) { throw `Invalid ${classname} first byte: ${readKeyActionId}`; diff --git a/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts b/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts index 27dffd7d..69c76e5c 100644 --- a/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts +++ b/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts @@ -49,8 +49,8 @@ export class KeystrokeAction extends KeyAction { } fromBinary(buffer: UhkBuffer): KeystrokeAction { - let keyActionId: KeyActionId = this.readAndAssertKeyActionId(buffer); - let flags: number = keyActionId - KeyActionId.KeystrokeAction; + const keyActionId: KeyActionId = this.readAndAssertKeyActionId(buffer); + const flags: number = keyActionId - KeyActionId.KeystrokeAction; if (flags & KeystrokeActionFlag.scancode) { this.scancode = buffer.readUInt8(); } @@ -64,7 +64,7 @@ export class KeystrokeAction extends KeyAction { } toJsonObject(): JsonObjectKeystrokeAction { - let jsonObject: JsonObjectKeystrokeAction = { + const jsonObject: JsonObjectKeystrokeAction = { keyActionType: keyActionType.KeystrokeAction }; @@ -85,7 +85,7 @@ export class KeystrokeAction extends KeyAction { toBinary(buffer: UhkBuffer) { let flags = 0; - let bufferData: number[] = []; + const bufferData: number[] = []; if (this.hasScancode()) { flags |= KeystrokeActionFlag.scancode; @@ -109,7 +109,7 @@ export class KeystrokeAction extends KeyAction { } toString(): string { - let properties: string[] = []; + const properties: string[] = []; if (this.hasScancode()) { properties.push(`scancode="${this.scancode}"`); } @@ -144,7 +144,7 @@ export class KeystrokeAction extends KeyAction { } getModifierList(): string[] { - let modifierList: string[] = []; + const modifierList: string[] = []; let modifierMask = this.modifierMask; for (let i = 0; modifierMask !== 0; ++i, modifierMask >>= 1) { if (modifierMask & 1) { diff --git a/shared/src/config-serializer/config-items/key-action/helper.ts b/shared/src/config-serializer/config-items/key-action/helper.ts index 93fe383f..3ddb8b3b 100644 --- a/shared/src/config-serializer/config-items/key-action/helper.ts +++ b/shared/src/config-serializer/config-items/key-action/helper.ts @@ -10,7 +10,6 @@ import { keyActionType } from './index'; -import { Keymap } from '../Keymap'; import { Macro } from '../Macro'; export class Helper { @@ -26,7 +25,7 @@ export class Helper { } private static fromUhkBuffer(buffer: UhkBuffer, macros: Macro[]): KeyAction { - let keyActionFirstByte = buffer.readUInt8(); + const keyActionFirstByte = buffer.readUInt8(); buffer.backtrack(); if (keyActionFirstByte >= KeyActionId.KeystrokeAction && keyActionFirstByte < KeyActionId.LastKeystrokeAction) { diff --git a/shared/src/config-serializer/config-items/macro-action/EditableMacroAction.ts b/shared/src/config-serializer/config-items/macro-action/EditableMacroAction.ts index 58f6c9d6..5d2a2cd7 100644 --- a/shared/src/config-serializer/config-items/macro-action/EditableMacroAction.ts +++ b/shared/src/config-serializer/config-items/macro-action/EditableMacroAction.ts @@ -93,13 +93,13 @@ export class EditableMacroAction { } fromKeyAction(keyAction: KeyAction): void { - let data = keyAction.toJsonObject(); + const data = keyAction.toJsonObject(); this.scancode = data.scancode; this.modifierMask = data.modifierMask; } toKeystrokeAction(): KeystrokeAction { - let data = this.toJsObject(); + const data = this.toJsObject(); data.keyActionType = keyActionType.KeystrokeAction; return (new KeystrokeAction().fromJsonObject(data)); } @@ -113,7 +113,7 @@ export class EditableMacroAction { } getMouseButtons(): boolean[] { - let enabledMouseButtons: boolean[] = []; + const enabledMouseButtons: boolean[] = []; for (let bitmask = this.mouseButtonsMask; bitmask; bitmask >>>= 1) { enabledMouseButtons.push(Boolean(bitmask & 1)); } diff --git a/shared/src/config-serializer/config-items/macro-action/KeyMacroAction.ts b/shared/src/config-serializer/config-items/macro-action/KeyMacroAction.ts index 563854f9..a68451a0 100644 --- a/shared/src/config-serializer/config-items/macro-action/KeyMacroAction.ts +++ b/shared/src/config-serializer/config-items/macro-action/KeyMacroAction.ts @@ -42,7 +42,7 @@ export class KeyMacroAction extends MacroAction { } fromBinary(buffer: UhkBuffer): KeyMacroAction { - let macroActionId: MacroActionId = this.readAndAssertMacroActionId(buffer); + const macroActionId: MacroActionId = this.readAndAssertMacroActionId(buffer); let keyMacroType: number = macroActionId - MacroActionId.KeyMacroAction; this.action = Math.floor(keyMacroType / NUM_OF_COMBINATIONS); keyMacroType %= NUM_OF_COMBINATIONS; @@ -56,7 +56,7 @@ export class KeyMacroAction extends MacroAction { } toJsonObject(): any { - let jsObject: JsObjectKeyMacroAction = { + const jsObject: JsObjectKeyMacroAction = { macroActionType: macroActionType.KeyMacroAction, action: MacroSubAction[this.action] }; diff --git a/shared/src/config-serializer/config-items/macro-action/MacroAction.ts b/shared/src/config-serializer/config-items/macro-action/MacroAction.ts index b5ac97e6..1e67b185 100644 --- a/shared/src/config-serializer/config-items/macro-action/MacroAction.ts +++ b/shared/src/config-serializer/config-items/macro-action/MacroAction.ts @@ -46,17 +46,17 @@ export let macroActionType = { export abstract class MacroAction { assertMacroActionType(jsObject: any) { - let macroActionClassname = this.constructor.name; - let macroActionTypeString = macroActionType[macroActionClassname]; + const macroActionClassname = this.constructor.name; + const macroActionTypeString = macroActionType[macroActionClassname]; if (jsObject.macroActionType !== macroActionTypeString) { throw `Invalid ${macroActionClassname}.macroActionType: ${jsObject.macroActionType}`; } } readAndAssertMacroActionId(buffer: UhkBuffer): MacroActionId { - let classname: string = this.constructor.name; - let readMacroActionId: MacroActionId = buffer.readUInt8(); - let macroActionId: MacroActionId = MacroActionId[classname]; + const classname: string = this.constructor.name; + const readMacroActionId: MacroActionId = buffer.readUInt8(); + const macroActionId: MacroActionId = MacroActionId[classname]; if (macroActionId === MacroActionId.KeyMacroAction) { if (readMacroActionId < MacroActionId.KeyMacroAction || readMacroActionId > MacroActionId.LastKeyMacroAction) { throw `Invalid ${classname} first byte: ${readMacroActionId}`; diff --git a/shared/src/config-serializer/config-items/macro-action/MouseButtonMacroAction.ts b/shared/src/config-serializer/config-items/macro-action/MouseButtonMacroAction.ts index a5626c29..08a371be 100644 --- a/shared/src/config-serializer/config-items/macro-action/MouseButtonMacroAction.ts +++ b/shared/src/config-serializer/config-items/macro-action/MouseButtonMacroAction.ts @@ -38,7 +38,7 @@ export class MouseButtonMacroAction extends MacroAction { } fromBinary(buffer: UhkBuffer): MouseButtonMacroAction { - let macroActionId: MacroActionId = this.readAndAssertMacroActionId(buffer); + const macroActionId: MacroActionId = this.readAndAssertMacroActionId(buffer); this.action = macroActionId - MacroActionId.MouseButtonMacroAction; this.mouseButtonsMask = buffer.readUInt8(); return this; @@ -66,7 +66,7 @@ export class MouseButtonMacroAction extends MacroAction { } getMouseButtons(): boolean[] { - let enabledMouseButtons: boolean[] = []; + const enabledMouseButtons: boolean[] = []; for (let bitmask = this.mouseButtonsMask; bitmask; bitmask >>>= 1) { enabledMouseButtons.push(Boolean(bitmask & 1)); } diff --git a/shared/src/config-serializer/config-items/macro-action/helper.ts b/shared/src/config-serializer/config-items/macro-action/helper.ts index c5b7d429..14f7d302 100644 --- a/shared/src/config-serializer/config-items/macro-action/helper.ts +++ b/shared/src/config-serializer/config-items/macro-action/helper.ts @@ -24,7 +24,7 @@ export class Helper { } private static fromUhkBuffer(buffer: UhkBuffer): MacroAction { - let macroActionFirstByte = buffer.readUInt8(); + const macroActionFirstByte = buffer.readUInt8(); buffer.backtrack(); if (macroActionFirstByte >= MacroActionId.KeyMacroAction && macroActionFirstByte <= MacroActionId.LastKeyMacroAction) { diff --git a/shared/src/services/mapper.service.ts b/shared/src/services/mapper.service.ts index 7ffd7089..a26390eb 100644 --- a/shared/src/services/mapper.service.ts +++ b/shared/src/services/mapper.service.ts @@ -27,7 +27,7 @@ export class MapperService { } public scanCodeToSvgImagePath(scanCode: number): string { - let fileName: string = this.scanCodeFileName.get(scanCode); + const fileName: string = this.scanCodeFileName.get(scanCode); if (fileName) { return 'assets/compiled_sprite.svg#' + fileName; } diff --git a/shared/src/store/effects/macro.ts b/shared/src/store/effects/macro.ts index 119c456f..2a3448fe 100644 --- a/shared/src/store/effects/macro.ts +++ b/shared/src/store/effects/macro.ts @@ -8,8 +8,6 @@ import 'rxjs/add/operator/do'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/withLatestFrom'; -import { Macro } from '../../config-serializer/config-items/Macro'; - import { KeymapActions, MacroActions } from '../actions'; import { AppState } from '../index'; diff --git a/shared/src/store/reducers/user-configuration.ts b/shared/src/store/reducers/user-configuration.ts index 0789cb5e..437231b1 100644 --- a/shared/src/store/reducers/user-configuration.ts +++ b/shared/src/store/reducers/user-configuration.ts @@ -5,7 +5,7 @@ import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/of'; import 'rxjs/add/operator/map'; -import { Helper as KeyActionHelper, KeyAction, SwitchKeymapAction } from '../../config-serializer/config-items/key-action'; +import { Helper as KeyActionHelper, KeyAction } from '../../config-serializer/config-items/key-action'; import { Keymap } from '../../config-serializer/config-items/Keymap'; import { Macro } from '../../config-serializer/config-items/Macro'; import { UserConfiguration } from '../../config-serializer/config-items/UserConfiguration'; @@ -74,7 +74,7 @@ export default function (state = initialState, action: Action): UserConfiguratio case KeymapActions.REMOVE: let isDefault: boolean; - let filtered: Keymap[] = state.keymaps.filter((keymap: Keymap) => { + const filtered: Keymap[] = state.keymaps.filter((keymap: Keymap) => { if (keymap.abbreviation === action.payload) { isDefault = keymap.isDefault; return false; @@ -306,8 +306,8 @@ function generateMacroId(macros: Macro[]) { } function checkExistence(layers: Layer[], property: string, value: any) { - let newLayers = layers.map((layer) => { - let newLayer = new Layer(layer); + const newLayers = layers.map(layer => { + const newLayer = new Layer(layer); newLayer.modules = layer.modules.map((module: Module) => { module.keyActions.forEach((action: KeyAction, index: number) => { diff --git a/shared/src/store/storage/index.ts b/shared/src/store/storage/index.ts index 70cd0881..2af8baeb 100644 --- a/shared/src/store/storage/index.ts +++ b/shared/src/store/storage/index.ts @@ -3,10 +3,8 @@ import { Injectable } from '@angular/core'; import { Action } from '@ngrx/store'; import { Keymap } from '../../config-serializer/config-items/Keymap'; -import { Macro } from '../../config-serializer/config-items/Macro'; import { UserConfiguration } from '../../config-serializer/config-items/UserConfiguration'; -import { KeymapActions, MacroActions } from '../actions'; import { AppState } from '../index'; import { Electron } from './electron'; import { Local } from './local'; diff --git a/shared/src/store/storage/local.ts b/shared/src/store/storage/local.ts index 918c7b95..1e9873c9 100644 --- a/shared/src/store/storage/local.ts +++ b/shared/src/store/storage/local.ts @@ -5,7 +5,7 @@ export class Local { constructor(private dataModelVersion: number) { } getConfig(): UserConfiguration { - let configJsonString = localStorage.getItem('config'); + const configJsonString = localStorage.getItem('config'); let config: UserConfiguration; if (configJsonString) { diff --git a/test-serializer/test-serializer.ts b/test-serializer/test-serializer.ts index 54893795..7b5aa257 100644 --- a/test-serializer/test-serializer.ts +++ b/test-serializer/test-serializer.ts @@ -1,27 +1,27 @@ import { UserConfiguration } from '../shared/src/config-serializer/config-items/UserConfiguration'; import { UhkBuffer } from '../shared/src/config-serializer/UhkBuffer'; -let assert = require('assert'); -let fs = require('fs'); +const assert = require('assert'); +const fs = require('fs'); -let userConfig = JSON.parse(fs.readFileSync('../shared/src/config-serializer/user-config.json')); +const userConfig = JSON.parse(fs.readFileSync('../shared/src/config-serializer/user-config.json')); -let config1Js = userConfig; -let config1Ts: UserConfiguration = new UserConfiguration().fromJsonObject(config1Js); -let config1Buffer = new UhkBuffer(); +const config1Js = userConfig; +const config1Ts: UserConfiguration = new UserConfiguration().fromJsonObject(config1Js); +const config1Buffer = new UhkBuffer(); config1Ts.toBinary(config1Buffer); -let config1BufferContent = config1Buffer.getBufferContent(); +const config1BufferContent = config1Buffer.getBufferContent(); fs.writeFileSync('user-config.bin', config1BufferContent); config1Buffer.offset = 0; console.log(); -let config2Ts = new UserConfiguration().fromBinary(config1Buffer); +const config2Ts = new UserConfiguration().fromBinary(config1Buffer); console.log('\n'); -let config2Js = config2Ts.toJsonObject(); -let config2Buffer = new UhkBuffer(); +const config2Js = config2Ts.toJsonObject(); +const config2Buffer = new UhkBuffer(); config2Ts.toBinary(config2Buffer); fs.writeFileSync('user-config-serialized.json', JSON.stringify(config2Js, undefined, 4)); -let config2BufferContent = config1Buffer.getBufferContent(); +const config2BufferContent = config1Buffer.getBufferContent(); fs.writeFileSync('user-config-serialized.bin', config2BufferContent); console.log('\n'); diff --git a/tslint.json b/tslint.json index cc4eed07..93aa8d45 100644 --- a/tslint.json +++ b/tslint.json @@ -17,6 +17,13 @@ "no-unused-expression": true, "no-use-before-declare": true, "no-var-keyword": true, + "space-before-function-paren": false, + "import-spacing": true, + "prefer-const": true, + "arrow-parens": [ + true, + "ban-single-arg-parens" + ], "radix": true, "switch-default": true, "triple-equals": true, diff --git a/web/src/main-app/main-app.routes.ts b/web/src/main-app/main-app.routes.ts index 3decdd8b..8d28a9fc 100644 --- a/web/src/main-app/main-app.routes.ts +++ b/web/src/main-app/main-app.routes.ts @@ -1,5 +1,5 @@ import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { addOnRoutes } from '../shared/components/add-on'; import { keymapRoutes } from '../components/keymap'; @@ -13,6 +13,6 @@ const appRoutes: Routes = [ ...settingsRoutes ]; -export const appRoutingProviders: any[] = [ ]; +export const appRoutingProviders: any[] = []; -export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true }); +export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });