Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrate TS #9

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "my-app",
"productName": "my-app",
"name": "tiana-tables",
"productName": "Tiana Tables",
"version": "1.0.0",
"description": "My Electron application description",
"main": ".vite/build/main.js",
Expand Down Expand Up @@ -41,19 +41,20 @@
"@electron-forge/plugin-auto-unpack-natives": "^7.2.0",
"@electron-forge/plugin-vite": "^7.2.0",
"@types/mysql": "^2.15.25",
"@types/react": "^18.2.55",
"@types/node": "^20.11.19",
"@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
Loading