Update linter
This commit is contained in:
@@ -67,7 +67,7 @@ export const addChart = (chartParameters: ChartParameters) => async (
|
||||
const chartExists = Boolean(
|
||||
getState()
|
||||
.charts.get('charts')
|
||||
.find((chart) => chart.topic === chartParameters.topic && chart.dotPath === chartParameters.dotPath)
|
||||
.find(chart => chart.topic === chartParameters.topic && chart.dotPath === chartParameters.dotPath)
|
||||
)
|
||||
if (chartExists) {
|
||||
dispatch(showNotification('Already added'))
|
||||
|
||||
@@ -20,7 +20,7 @@ export const connect = (options: MqttOptions, connectionId: string) => (
|
||||
const event = makeConnectionStateEvent(connectionId)
|
||||
const host = url.parse(options.url).hostname
|
||||
|
||||
rendererEvents.subscribe(event, (dataSourceState) => {
|
||||
rendererEvents.subscribe(event, dataSourceState => {
|
||||
if (dataSourceState.connected) {
|
||||
const didReconnect = Boolean(getState().connection.tree)
|
||||
if (!didReconnect) {
|
||||
|
||||
@@ -146,7 +146,7 @@ export const deleteConnection = (connectionId: string) => (dispatch: Dispatch<an
|
||||
const connectionIds = Object.keys(getState().connectionManager.connections)
|
||||
const connectionIdLocation = connectionIds.indexOf(connectionId)
|
||||
|
||||
const remainingIds = connectionIds.filter((id) => id !== connectionId)
|
||||
const remainingIds = connectionIds.filter(id => id !== connectionId)
|
||||
const nextSelectedConnectionIndex = Math.min(remainingIds.length - 1, connectionIdLocation)
|
||||
const nextSelectedConnection = remainingIds[nextSelectedConnectionIndex]
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export const toggleSettingsVisibility = () => (dispatch: Dispatch<any>) => {
|
||||
}
|
||||
|
||||
export const requestConfirmation = (title: string, inquiry: string) => (dispatch: Dispatch<any>) => {
|
||||
return new Promise((resolve) => {
|
||||
return new Promise(resolve => {
|
||||
const confirmationRequest = {
|
||||
title,
|
||||
inquiry,
|
||||
|
||||
@@ -40,8 +40,8 @@ export const clearTopic = (topic: q.TreeNode<any>, recursive: boolean) => async
|
||||
const publishEvent = makePublishEvent(connectionId)
|
||||
|
||||
topicsForPurging
|
||||
.filter((t) => t.path() !== '' && t.hasMessage())
|
||||
.map((t) => t.path())
|
||||
.filter(t => t.path() !== '' && t.hasMessage())
|
||||
.map(t => t.path())
|
||||
.forEach((path, idx) => {
|
||||
const mqttMessage = {
|
||||
topic: path,
|
||||
|
||||
@@ -82,7 +82,7 @@ function findNextNodeUpward(
|
||||
}
|
||||
|
||||
const neighborNodes = sortedNodes(settings, parent)
|
||||
const nodeIdx = neighborNodes.findIndex((n) => n.path() === treeNode.path())
|
||||
const nodeIdx = neighborNodes.findIndex(n => n.path() === treeNode.path())
|
||||
if (nodeIdx === 0) {
|
||||
return parent
|
||||
}
|
||||
@@ -125,7 +125,7 @@ function findNextNodeDownwardNeighbor(
|
||||
}
|
||||
|
||||
const neighborNodes = sortedNodes(settings, parent).filter(isTreeNodeVisible)
|
||||
const nodeIdx = neighborNodes.findIndex((n) => n.path() === treeNode.path())
|
||||
const nodeIdx = neighborNodes.findIndex(n => n.path() === treeNode.path())
|
||||
const downwardNeighbor = neighborNodes[nodeIdx + 1]
|
||||
if (downwardNeighbor) {
|
||||
return downwardNeighbor
|
||||
|
||||
Reference in New Issue
Block a user