Fix lint errors

This commit is contained in:
Sacha Weatherstone
2021-10-31 19:52:01 +11:00
parent a5d67279de
commit f630dc3141
4 changed files with 21 additions and 23 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-hooks": "^4.2.1-alpha-9c8161ba8-20211028",
"gzipper": "^6.0.0",
"postcss": "^8.3.11",
"prettier": "^2.4.1",
+5 -5
View File
@@ -28,7 +28,7 @@ specifiers:
eslint-import-resolver-typescript: ^2.5.0
eslint-plugin-import: ^2.25.2
eslint-plugin-react: ^7.26.1
eslint-plugin-react-hooks: ^4.2.0
eslint-plugin-react-hooks: ^4.2.1-alpha-9c8161ba8-20211028
gzipper: ^6.0.0
i18next: ^21.3.3
i18next-browser-languagedetector: ^6.1.2
@@ -97,7 +97,7 @@ devDependencies:
eslint-import-resolver-typescript: 2.5.0_f3fc3a8f1727ab01eb417b5ed5016c22
eslint-plugin-import: 2.25.2_eslint@8.1.0
eslint-plugin-react: 7.26.1_eslint@8.1.0
eslint-plugin-react-hooks: 4.2.0_eslint@8.1.0
eslint-plugin-react-hooks: 4.2.1-alpha-9c8161ba8-20211028_eslint@8.1.0
gzipper: 6.0.0
postcss: 8.3.11
prettier: 2.4.1
@@ -2240,11 +2240,11 @@ packages:
eslint: 7.32.0
dev: true
/eslint-plugin-react-hooks/4.2.0_eslint@8.1.0:
resolution: {integrity: sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==}
/eslint-plugin-react-hooks/4.2.1-alpha-9c8161ba8-20211028_eslint@8.1.0:
resolution: {integrity: sha512-wqdj1w8azrZwM5yYh3Pm6y/Cxg6nA+Nb2OqkHZ3Bf+cmnoCs2MSDUal+AnKAZN3kxWjSK4rljuromNaxUejyiA==}
engines: {node: '>=10'}
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
dependencies:
eslint: 8.1.0
dev: true
+6 -4
View File
@@ -90,8 +90,9 @@ const App = (): JSX.Element => {
);
});
connection.onNodeInfoPacket.subscribe((nodeInfoPacket) =>
dispatch(addNode(nodeInfoPacket.data)),
connection.onNodeInfoPacket.subscribe(
(nodeInfoPacket): void | { payload: Protobuf.NodeInfo; type: string } =>
dispatch(addNode(nodeInfoPacket.data)),
);
connection.onAdminPacket.subscribe((adminPacket) => {
@@ -111,8 +112,9 @@ const App = (): JSX.Element => {
}
});
connection.onMeshHeartbeat.subscribe((date) =>
dispatch(setLastMeshInterraction(date.getTime())),
connection.onMeshHeartbeat.subscribe(
(date): void | { payload: number; type: string } =>
dispatch(setLastMeshInterraction(date.getTime())),
);
connection.onTextPacket.subscribe((message) => {
+9 -13
View File
@@ -78,12 +78,8 @@ export const Connection = ({
setConnection(new ISerialConnection());
}
console.log(params);
// @ts-ignore
connection.connect(params);
console.log(connection);
// @ts-ignore tmp
await connection.connect(params);
};
const updateBleDeviceList = async (): Promise<void> => {
@@ -100,10 +96,10 @@ export const Connection = ({
React.useEffect(() => {
if (selectedConnType === connType.BLE) {
updateBleDeviceList();
void updateBleDeviceList();
}
if (selectedConnType === connType.SERIAL) {
updateSerialDeviceList();
void updateSerialDeviceList();
}
}, [selectedConnType]);
@@ -194,8 +190,8 @@ export const Connection = ({
</Button>
<Button
border
onClick={() => {
ble.getDevice();
onClick={async () => {
await ble.getDevice();
}}
>
New Device
@@ -239,8 +235,8 @@ export const Connection = ({
</Button>
<Button
border
onClick={() => {
serial.getPort();
onClick={async () => {
await serial.getPort();
}}
>
New Device
@@ -260,7 +256,7 @@ export const Connection = ({
<IconButton
onClick={() => {
connect(connType.SERIAL, {
// @ts-ignore
// @ts-ignore tmp
device: device,
});
}}