Skip to content

Commit

Permalink
upgrate typescript to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeniau committed Feb 20, 2024
1 parent dca4d0c commit 565ee45
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 216 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@
"@electron-forge/plugin-vite": "^7.2.0",
"@types/mysql": "^2.15.25",
"@types/node": "^20.11.19",
"@types/react": "^18.2.55",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"electron": "28.2.3",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.0.1",
"eslint-plugin-import": "^2.25.0",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"mysql2": "^3.9.1",
"react-router-dom": "^6.22.1",
"ts-node": "^10.0.0",
"typescript": "~4.5.4",
"vitest": "^1.3.0"
"ts-node": "^10.9.2",
"typescript": "~5.3.3",
"vitest": "^1.3.1"
},
"packageManager": "[email protected]"
}
7 changes: 1 addition & 6 deletions src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { createRoot } from 'react-dom/client';
import {
Outlet,
MemoryRouter as Router,
RouterProvider,
createMemoryRouter,
} from 'react-router';
import { RouterProvider, createMemoryRouter } from 'react-router';
import styled from 'styled-components';
import React, { PureComponent } from 'react';
import Root from './routes/root';
Expand Down
2 changes: 1 addition & 1 deletion src/component/Connection/ConnectionStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ConnectionStack extends PureComponent<Props, State> {
async handleConnectTo(params: ConnectionObject) {
const { navigate } = this.props;

const threadId = await window.sql.openConnection(params);
await window.sql.openConnection(params);

this.setState((prevState) => {
const { connectionNameList } = prevState;
Expand Down
1 change: 0 additions & 1 deletion src/component/Query/WhereFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function WhereFilter({ defaultValue, onSubmit }: Props): ReactElement {
onSubmit(where);
}}
>
{/* @ts-expect-error not present infuture TS verwsion */}
<WhereArea value={where} onChange={(e) => setWhere(e.target.value)} />

<input type="submit" />
Expand Down
2 changes: 1 addition & 1 deletion src/configuration/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, test, vi } from 'vitest';
import { existsSync, mkdirSync, readFileSync, writeFile } from 'node:fs';
import { existsSync, readFileSync, writeFile } from 'node:fs';
import {
addConnectionToConfig,
getConfiguration,
Expand Down
3 changes: 2 additions & 1 deletion src/sql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ConnectionStack {
}

async connect(senderId: number, params: ConnectionObject): Promise<number> {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { name, ...rest } = params;
const connection = await createConnection(rest);
await connection.connect();
Expand All @@ -29,7 +30,7 @@ class ConnectionStack {
return connection.threadId;
}

async query(senderId: number, query: string): Promise<any> {
async query(senderId: number, query: string): Promise<unknown> {
const connection = this.#getConnection(senderId);

return await connection.query(query);
Expand Down
Loading

0 comments on commit 565ee45

Please sign in to comment.