Skip to content

Commit 4093a48

Browse files
committed
style: fix linting step
- tslint was removed here 13b8f8d - add sparkplug words to cspell
1 parent d724dbc commit 4093a48

File tree

25 files changed

+156
-169
lines changed

25 files changed

+156
-169
lines changed

.cspell.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@
4747
"mixins",
4848
"Explorerdmg",
4949
"heapsnapshot",
50-
"noconflict"
50+
"noconflict",
51+
"DDATA",
52+
"NDATA",
53+
"NCMD",
54+
"DCMD",
55+
"NBIRTH",
56+
"DBIRTH",
57+
"NDEATH",
58+
"DDEATH",
59+
"sparkplugb",
60+
"protojson",
61+
"protobuf",
62+
"cirruslink",
63+
"typesafe"
5164
]
52-
}
65+
}

app/src/components/App.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import { ConfirmationRequest } from '../reducers/Global'
1212
import { connect } from 'react-redux'
1313
import { globalActions, settingsActions } from '../actions'
1414
import { Theme, withStyles } from '@material-ui/core/styles'
15-
16-
(window as any).global = window
15+
;(window as any).global = window
1716

1817
const Settings = React.lazy(() => import('./SettingsDrawer/Settings'))
1918
const ContentView = React.lazy(() => import('./Layout/ContentView'))
@@ -68,7 +67,7 @@ class App extends React.PureComponent<Props, {}> {
6867
return null
6968
}
7069

71-
const anyProps: any = {};
70+
const anyProps: any = {}
7271

7372
return (
7473
<div className={centerContent}>

app/src/components/Demo/Mouse.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ class Demo extends React.Component<{ classes: any }, State> {
4343
}
4444

4545
public componentDidMount() {
46-
; (window as any).demo.enableMouse = () => {
46+
;(window as any).demo.enableMouse = () => {
4747
this.setState({ enabled: true })
4848
}
49-
; (window as any).demo.moveMouse = (x: number, y: number, animationTime: number) => {
50-
const stepSizeX = Math.abs(this.state.position.x - x) / (animationTime / this.frameInterval)
51-
const stepSizeY = Math.abs(this.state.position.y - y) / (animationTime / this.frameInterval)
52-
this.setState({ stepSizeX, stepSizeY, enabled: true, target: { x, y } })
53-
this.moveCloser()
54-
}
49+
;(window as any).demo.moveMouse = (x: number, y: number, animationTime: number) => {
50+
const stepSizeX = Math.abs(this.state.position.x - x) / (animationTime / this.frameInterval)
51+
const stepSizeY = Math.abs(this.state.position.y - y) / (animationTime / this.frameInterval)
52+
this.setState({ stepSizeX, stepSizeY, enabled: true, target: { x, y } })
53+
this.moveCloser()
54+
}
5555
}
5656

5757
public render() {

app/src/components/Demo/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function writeHeapdump(path?: string) {
1212
return path
1313
}
1414

15-
; (window as any).demo = {
15+
;(window as any).demo = {
1616
writeHeapdump,
1717
}
1818

app/src/components/SettingsDrawer/TimeLocale.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { settingsActions } from '../../actions'
88
import { withStyles } from '@material-ui/styles'
99

1010
function importAll(r: any) {
11-
r.keys().forEach(r);
11+
r.keys().forEach(r)
1212
}
1313
// @ts-expect-error -- webpack require
14-
importAll(require.context('moment/locale', true, /\.js$/));
14+
importAll(require.context('moment/locale', true, /\.js$/))
1515

1616
const moment = require('moment')
1717

app/src/components/Sidebar/ValueRenderer/ValueRenderer.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ class ValueRenderer extends React.Component<Props, State> {
8383
}
8484

8585
public render() {
86-
return <div style={{ padding: '0px 0px 8px 0px', width: '100%' }}>
87-
{this.props.message?.payload?.decoder === Decoder.SPARKPLUG && "Decoded SparkplugB"}
88-
{this.renderValue()}
89-
</div>
86+
return (
87+
<div style={{ padding: '0px 0px 8px 0px', width: '100%' }}>
88+
{this.props.message?.payload?.decoder === Decoder.SPARKPLUG && 'Decoded SparkplugB'}
89+
{this.renderValue()}
90+
</div>
91+
)
9092
}
9193

9294
public renderValue() {

app/src/components/TopicPlot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function nodeDotPathToHistory(startTime: number | undefined, history: q.MessageH
4040
let json: any = {}
4141
try {
4242
json = message.payload ? JSON.parse(Base64Message.toUnicodeString(message.payload)) : {}
43-
} catch (ignore) { }
43+
} catch (ignore) {}
4444

4545
const value = dotProp.get(json, dotPath)
4646

app/src/components/UpdateNotifier.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class UpdateNotifier extends React.PureComponent<Props, State> {
5555
}
5656

5757
private async checkForUpdates() {
58-
const ownVersion = await rendererRpc.call(getAppVersion, undefined, 10000);
59-
const releases = await this.fetchReleases();
58+
const ownVersion = await rendererRpc.call(getAppVersion, undefined, 10000)
59+
const releases = await this.fetchReleases()
6060
const newerVersions = releases
6161
.filter(release => this.allowPrereleaseIfOwnVersionIsBeta(release, ownVersion))
6262
.filter(release => compareVersions(release.tag_name, ownVersion) > 0)

app/src/utils/PersistentStorage.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { rendererRpc } from '../../../events'
22

3-
import {
4-
storageStoreEvent,
5-
storageLoadEvent,
6-
storageClearEvent,
7-
} from '../../../events/StorageEvents'
3+
import { storageStoreEvent, storageLoadEvent, storageClearEvent } from '../../../events/StorageEvents'
84

95
export interface StorageIdentifier<Model> {
106
id: string
@@ -25,9 +21,13 @@ class RemoteStorage implements PersistentStorage {
2521
}
2622

2723
public async load<Model>(identifier: StorageIdentifier<Model>): Promise<Model | undefined> {
28-
const result = await rendererRpc.call(storageLoadEvent, {
29-
store: identifier.id,
30-
}, 10000)
24+
const result = await rendererRpc.call(
25+
storageLoadEvent,
26+
{
27+
store: identifier.id,
28+
},
29+
10000
30+
)
3131

3232
return (result as any).data
3333
}

backend/src/ConfigStorage.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import * as fs from 'fs-extra'
33
import * as lowdb from 'lowdb'
44
import * as path from 'path'
55
import { backendRpc } from '../../events'
6-
import {
7-
storageClearEvent,
8-
storageLoadEvent,
9-
storageStoreEvent,
10-
} from '../../events/StorageEvents'
6+
import { storageClearEvent, storageLoadEvent, storageStoreEvent } from '../../events/StorageEvents'
117

128
export default class ConfigStorage {
139
private file: string

0 commit comments

Comments
 (0)