Skip to content

Commit 4891d74

Browse files
committed
fix linter
1 parent bdd26ef commit 4891d74

File tree

6 files changed

+187
-145
lines changed

6 files changed

+187
-145
lines changed

.eslintrc.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ts-check
2+
import eslint from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import prettier from "eslint-plugin-prettier/recommended";
5+
6+
export default tseslint.config(
7+
eslint.configs.recommended,
8+
...tseslint.configs.recommended,
9+
prettier
10+
);

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"build": "webpack --mode=production",
2424
"build:dev": "webpack --mode=development",
2525
"icons": "png2icons resources/icons/1024x1024.png resources/icon -all -i",
26-
"lint": "eslint --fix --ext .ts,.js ./src",
26+
"lint": "eslint --fix ./src",
2727
"package": "yarn electron-builder --config electron-builder.js"
2828
},
2929
"dependencies": {
@@ -34,24 +34,27 @@
3434
"uuid": "^9.0.0"
3535
},
3636
"devDependencies": {
37+
"@eslint/js": "^9.14.0",
38+
"@types/eslint__js": "^8.42.3",
3739
"@types/node": "20.14.2",
3840
"@types/uuid": "^9.0.8",
3941
"@types/webpack": "^5.28.0",
4042
"@types/webpack-node-externals": "^3.0.4",
41-
"@typescript-eslint/eslint-plugin": "^8.1.0",
42-
"@typescript-eslint/parser": "^8.1.0",
43+
"@typescript-eslint/eslint-plugin": "^8.13.0",
44+
"@typescript-eslint/parser": "^8.13.0",
4345
"cross-env": "^7.0.2",
4446
"electron": "20.1.4",
4547
"electron-builder": "^24.13.3",
46-
"eslint": "^9.4.0",
48+
"eslint": "^9.14.0",
4749
"eslint-config-prettier": "^9.1.0",
4850
"eslint-plugin-prettier": "^5.1.3",
4951
"png2icons": "^2.0.1",
5052
"prettier": "^3.3.1",
5153
"source-map-support": "^0.5.21",
5254
"ts-loader": "^9.3.1",
5355
"ts-node": "^10.9.1",
54-
"typescript": "^5.4.5",
56+
"typescript": "^5.6.3",
57+
"typescript-eslint": "^8.13.0",
5558
"webpack": "^5.74.0",
5659
"webpack-cli": "^5.1.4",
5760
"webpack-merge": "^5.8.0",

src/background.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,10 @@ if (gotTheLock) {
149149
});
150150

151151
mainWindow.webContents.setWindowOpenHandler((details) => {
152-
shell.openExternal(details.url)
153-
return {action: "deny"}
152+
shell.openExternal(details.url);
153+
return { action: "deny" };
154154
});
155155

156-
157156
mainWindow.webContents.on("context-menu", popupContextMenu);
158157

159158
// block Google collecting data

src/helpers/trayManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ export class TrayManager {
149149

150150
private handleTrayClick() {
151151
const mainWindow = getMainWindow();
152-
if (!mainWindow)
153-
return;
152+
if (!mainWindow) return;
154153

155154
if (mainWindow.isVisible()) {
156155
mainWindow.hide();

0 commit comments

Comments
 (0)