Add new tslint rules and fix rule breaks
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user