diff --git a/src/__test_support__/fake_resource.ts b/src/__test_support__/fake_resource.ts index 81e5c8746..d838757e2 100644 --- a/src/__test_support__/fake_resource.ts +++ b/src/__test_support__/fake_resource.ts @@ -5,7 +5,7 @@ import { } from "../resources/tagged_resources"; import { generateUuid } from "../resources/util"; -var ID_COUNTER = 0; +let ID_COUNTER = 0; // tslint:disable-next-line:max-line-length export function fakeResource { describe("safeStringFetch", () => { let data = { + // tslint:disable-next-line:no-null-keyword "null": null, "undefined": undefined, "number": 0, diff --git a/src/account/state_to_props.ts b/src/account/state_to_props.ts index 5bc59c160..83711d54d 100644 --- a/src/account/state_to_props.ts +++ b/src/account/state_to_props.ts @@ -20,4 +20,3 @@ export function mapStateToProps(props: Everything): Props { dispatch: () => { throw new Error("NEVER SHOULD HAPPEN"); } }; } - diff --git a/src/api/api.ts b/src/api/api.ts index 752f7abb1..a8cfea293 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -48,7 +48,7 @@ export class API { static parseURL(url: string): UrlInfo { // Such an amazing hack! - var info = document.createElement("a"); + let info = document.createElement("a"); info.href = url; return info; } diff --git a/src/config/reducer.ts b/src/config/reducer.ts index 4341216fc..ab834dd02 100644 --- a/src/config/reducer.ts +++ b/src/config/reducer.ts @@ -19,4 +19,3 @@ export let configReducer = generateReducer(initialState) s.host = payload.host; return s; }); - diff --git a/src/controls/state_to_props.ts b/src/controls/state_to_props.ts index 5963ac80b..babfc3f34 100644 --- a/src/controls/state_to_props.ts +++ b/src/controls/state_to_props.ts @@ -20,4 +20,3 @@ export function mapStateToProps(props: Everything): Props { peripherals }; } - diff --git a/src/devices/actions.ts b/src/devices/actions.ts index 065368291..f23a6d961 100644 --- a/src/devices/actions.ts +++ b/src/devices/actions.ts @@ -36,6 +36,14 @@ function incomingStatus(statusMessage: HardwareState) { function isLog(x: object): x is Log { return _.isObject(x) && _.isString(_.get(x, "message" as keyof Log)); } +let commandErr = (noun = "Command") => () => { + console.info("Took longer than 6 seconds: " + noun); +}; + +let commandOK = (noun = "Command") => () => { + let msg = noun + " request sent to device."; + success(msg, t("Request sent")); +}; export function checkControllerUpdates() { let noun = "Check for Updates"; @@ -143,15 +151,6 @@ export let saveAccountChanges: Thunk = function (dispatch, getState) { return save(getDeviceAccountSettings(getState().resources.index)); }; -let commandErr = (noun = "Command") => () => { - console.info("Took longer than 6 seconds: " + noun); -}; - -let commandOK = (noun = "Command") => () => { - let msg = noun + " request sent to device."; - success(msg, t("Request sent")); -}; - export let fetchReleases = (url: string) => (dispatch: Function, getState: Function) => { axios diff --git a/src/devices/state_to_props.ts b/src/devices/state_to_props.ts index 78cfc3c74..fdb484148 100644 --- a/src/devices/state_to_props.ts +++ b/src/devices/state_to_props.ts @@ -14,4 +14,3 @@ export function mapStateToProps(props: Everything): Props { images: selectAllImages(props.resources.index) }; } - diff --git a/src/nav/links.tsx b/src/nav/links.tsx index 945a91a16..81394d543 100644 --- a/src/nav/links.tsx +++ b/src/nav/links.tsx @@ -13,6 +13,9 @@ export const links = [ { name: "Farmware", icon: "crosshairs", slug: "farmware" } ]; +// if (process.env.NODE_ENV !== "production") { +// links.push({ name: "X", icon: "leaf", slug: "debug" }); +// } export const NavLinks = () => { let currPath = history.getCurrentLocation().pathname; return ( diff --git a/src/resources/util.ts b/src/resources/util.ts index c517189c4..81c72c77e 100644 --- a/src/resources/util.ts +++ b/src/resources/util.ts @@ -6,7 +6,7 @@ import * as _ from "lodash"; let count = 0; export function generateUuid(id: number | undefined, kind: ResourceName) { - return `${joinKindAndId(kind, id)}.${count++}` + return `${joinKindAndId(kind, id)}.${count++}`; } export function arrayWrap(input: T | (T[])): T[] { diff --git a/src/sequences/actions.ts b/src/sequences/actions.ts index 161c9a93a..e25b30923 100644 --- a/src/sequences/actions.ts +++ b/src/sequences/actions.ts @@ -11,7 +11,7 @@ export function pushStep(step: SequenceBodyItem, sequence: TaggedSequence) { let next = defensiveClone(sequence); next.body.body = next.body.body || []; - next.body.body.push(defensiveClone(step)) + next.body.body.push(defensiveClone(step)); dispatch(overwrite(sequence, next.body)); } @@ -28,7 +28,7 @@ export function copySequence(payload: TaggedSequence) { copy.body.name = copy.body.name + ` copy ${count++}`; copy.uuid = "HEY REDUCER! Set this!"; dispatch(init(copy)); - } + }; } export function moveStep(step: Step, @@ -39,7 +39,7 @@ export function moveStep(step: Step, type: "MOVE_STEP", payload: { step, from, to } }; - } + }; } export function changeStepSelect( diff --git a/src/sequences/step_tiles/tile_move_absolute/format_selected_dropdown.ts b/src/sequences/step_tiles/tile_move_absolute/format_selected_dropdown.ts index 22cb7e4cb..f94a7bb18 100644 --- a/src/sequences/step_tiles/tile_move_absolute/format_selected_dropdown.ts +++ b/src/sequences/step_tiles/tile_move_absolute/format_selected_dropdown.ts @@ -21,7 +21,7 @@ export function formatSelectedDropdown(ri: ResourceIndex, ld: LocationData): Dro function toolbar(ri: ResourceIndex, ld: Tool): DropDownItem { let tool = findToolById(ri, ld.args.tool_id).body; let label = dropDownName("Tool", tool.name); - return { label, value: tool.id || -999 } + return { label, value: tool.id || -999 }; } function point(ri: ResourceIndex, ld: Point): DropDownItem { @@ -39,7 +39,7 @@ function point(ri: ResourceIndex, ld: Point): DropDownItem { label = dropDownName(p.pointer_type, p.name, { x: p.x, y: p.y, z: p.z }); break; } - return { label, value: p.id || -999 } + return { label, value: p.id || -999 }; } function other() { return NULL_CHOICE; } diff --git a/src/sequences/step_tiles/tile_move_absolute/generate_list.ts b/src/sequences/step_tiles/tile_move_absolute/generate_list.ts index 1f997d463..22cb069af 100644 --- a/src/sequences/step_tiles/tile_move_absolute/generate_list.ts +++ b/src/sequences/step_tiles/tile_move_absolute/generate_list.ts @@ -16,7 +16,7 @@ export function generateList(input: ResourceIndex): DropDownItem[] { let toolNameById = mapToolIdToName(input); let SORT_KEY: keyof DropDownItem = "headingId"; let points = selectAllPoints(input) - .filter(x => (x.body.pointer_type !== "ToolSlot")) + .filter(x => (x.body.pointer_type !== "ToolSlot")); let toolDDI = selectAllTools(input) .filter(x => !!x.body.id) .map(t => formatTools(t)); diff --git a/tslint.json b/tslint.json index 71d3538f8..5b34577b3 100644 --- a/tslint.json +++ b/tslint.json @@ -63,9 +63,6 @@ "no-shadowed-variable": true, "no-switch-case-fall-through": true, "no-trailing-whitespace": true, - "no-unused-locals": true, - "no-unused-parameters": true, - "no-unused-expression": true, "no-unused-variable": [ true ],