Fixed all lint issues
This commit is contained in:
parent
54054797b1
commit
4e5abdd0de
@ -10,17 +10,30 @@ export default class DurationInput extends React.Component<{
|
||||
render() {
|
||||
const duration = this.props.duration;
|
||||
// const editing = this.props.onDurationChange != null;
|
||||
return <div className="field durationInput">
|
||||
<label>Duration</label>
|
||||
<div className="fields">
|
||||
<Input type="number" className="field durationInput--minutes"
|
||||
value={duration.minutes} onChange={this.onMinutesChange}
|
||||
label="M" labelPosition="right" />
|
||||
<Input type="number" className="field durationInput--seconds"
|
||||
value={duration.seconds} onChange={this.onSecondsChange} max="60"
|
||||
label="S" labelPosition="right" />
|
||||
return (
|
||||
<div className="field durationInput">
|
||||
<label>Duration</label>
|
||||
<div className="fields">
|
||||
<Input
|
||||
type="number"
|
||||
className="field durationInput--minutes"
|
||||
value={duration.minutes}
|
||||
onChange={this.onMinutesChange}
|
||||
label="M"
|
||||
labelPosition="right"
|
||||
/>
|
||||
<Input
|
||||
type="number"
|
||||
className="field durationInput--seconds"
|
||||
value={duration.seconds}
|
||||
onChange={this.onSecondsChange}
|
||||
max="60"
|
||||
label="S"
|
||||
labelPosition="right"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>;
|
||||
);
|
||||
}
|
||||
|
||||
private onMinutesChange = (e: React.SyntheticEvent<any>, { value }: InputOnChangeData) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { Message, MessageList, TransitionGroup } from "semantic-ui-react";
|
||||
import { Message, TransitionGroup } from "semantic-ui-react";
|
||||
|
||||
import { Message as UiMessage, UiStore } from "@app/ui";
|
||||
|
||||
@ -11,7 +11,7 @@ class MessageView extends React.Component<{
|
||||
}> {
|
||||
|
||||
render() {
|
||||
const { id, header, content, type } = this.props.message;
|
||||
const { header, content, type } = this.props.message;
|
||||
return (
|
||||
<Message
|
||||
header={header}
|
||||
|
@ -7,8 +7,10 @@ import { SectionRunner } from "@common/sprinklers";
|
||||
@observer
|
||||
export default class SectionRunnerView extends React.Component<{ sectionRunner: SectionRunner }, {}> {
|
||||
render() {
|
||||
return <Segment>
|
||||
<h4>Section Runner Queue</h4>
|
||||
</Segment>;
|
||||
return (
|
||||
<Segment>
|
||||
<h4>Section Runner Queue</h4>
|
||||
</Segment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { EventEmitter } from "events";
|
||||
import "paho-mqtt";
|
||||
import MQTT = Paho.MQTT;
|
||||
|
||||
@ -14,7 +13,7 @@ import {
|
||||
SprinklersDevice,
|
||||
TimeOfDay,
|
||||
} from "@common/sprinklers";
|
||||
import { checkedIndexOf, getRandomId } from "@common/utils";
|
||||
import { checkedIndexOf } from "@common/utils";
|
||||
|
||||
export class MqttApiClient implements ISprinklersApi {
|
||||
client: MQTT.Client;
|
||||
@ -158,6 +157,7 @@ class MqttSprinklersDevice extends SprinklersDevice {
|
||||
let matches = topic.match(/^sections(?:\/(\d+)(?:\/?(.+))?)?$/);
|
||||
if (matches != null) {
|
||||
//noinspection JSUnusedLocalSymbols
|
||||
/* tslint:disable-next-line:no-unused-variable */
|
||||
const [_topic, secStr, subTopic] = matches;
|
||||
// console.log(`section: ${secStr}, topic: ${subTopic}, payload: ${payload}`);
|
||||
if (!secStr) { // new number of sections
|
||||
@ -175,6 +175,7 @@ class MqttSprinklersDevice extends SprinklersDevice {
|
||||
matches = topic.match(/^programs(?:\/(\d+)(?:\/?(.+))?)?$/);
|
||||
if (matches != null) {
|
||||
//noinspection JSUnusedLocalSymbols
|
||||
/* tslint:disable-next-line:no-unused-variable */
|
||||
const [_topic, progStr, subTopic] = matches;
|
||||
// console.log(`program: ${progStr}, topic: ${subTopic}, payload: ${payload}`);
|
||||
if (!progStr) { // new number of programs
|
||||
@ -197,6 +198,7 @@ class MqttSprinklersDevice extends SprinklersDevice {
|
||||
matches = topic.match(/^responses\/(\d+)$/);
|
||||
if (matches != null) {
|
||||
//noinspection JSUnusedLocalSymbols
|
||||
/* tslint:disable-next-line:no-unused-variable */
|
||||
const [_topic, respIdStr] = matches;
|
||||
console.log(`response: ${respIdStr}`);
|
||||
const respId = parseInt(respIdStr, 10);
|
||||
|
@ -12,8 +12,8 @@
|
||||
"watch:server": "yarn build:server --watch",
|
||||
"start:dev-server": "webpack-dev-server --config ./app/webpack/dev.config.js",
|
||||
"start": "node dist/index.js",
|
||||
"lint:app": "tslint --project app --force",
|
||||
"lint:server": "tslint --project server --force",
|
||||
"lint:app": "tslint --project app --force --format verbose",
|
||||
"lint:server": "tslint --project server --force --format verbose",
|
||||
"lint": "run-p lint:*"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user