Skip to content

Commit

Permalink
[desktop] Upgrade dependencies to latest + ESLint 9 (#1962)
Browse files Browse the repository at this point in the history
The two outdated dependencies in the desktop code at this point are
* Jackspeak, which needs to be pinned because of
isaacs/jackspeak#5 (Presumably we'll not need
this once we go yarn v4).
* Electron store, which is ESM only.
  • Loading branch information
mnvr authored Jun 2, 2024
2 parents 38c88c9 + 27b7532 commit 55ee9a5
Show file tree
Hide file tree
Showing 14 changed files with 368 additions and 256 deletions.
36 changes: 0 additions & 36 deletions desktop/.eslintrc.js

This file was deleted.

43 changes: 43 additions & 0 deletions desktop/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// @ts-check

import js from "@eslint/js";
import ts from "typescript-eslint";

export default ts.config(
js.configs.recommended,
...ts.configs.strictTypeChecked,
...ts.configs.stylisticTypeChecked,
{
// typescript-eslint needs this enabling type checked rules.
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
// The list of (minimatch) globs to ignore. This needs to be the only
// key in this configuration object.
ignores: ["eslint.config.mjs", "app/", "out/", "dist/"],
},
{
// Rule customizations.
rules: {
// Allow numbers to be used in template literals.
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
},
],
// Allow void expressions as the entire body of an arrow function.
"@typescript-eslint/no-confusing-void-expression": [
"error",
{
ignoreArrowShorthand: true,
},
],
},
},
);
17 changes: 9 additions & 8 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dev-main": "tsc && electron .",
"dev-renderer": "cd ../web && yarn install && yarn dev:photos",
"postinstall": "electron-builder install-app-deps",
"lint": "yarn prettier --check --log-level warn . && eslint --ext .ts src && yarn tsc",
"lint-fix": "yarn prettier --write --log-level warn . && eslint --fix --ext .ts src && yarn tsc"
"lint": "yarn prettier --check --log-level warn . && yarn eslint && yarn tsc",
"lint-fix": "yarn prettier --write --log-level warn . && yarn eslint && yarn tsc"
},
"resolutions": {
"jackspeak": "2.1.1"
Expand All @@ -36,23 +36,24 @@
"jpeg-js": "^0.4",
"next-electron-server": "^1",
"node-stream-zip": "^1.15",
"onnxruntime-node": "^1.17"
"onnxruntime-node": "^1.18"
},
"devDependencies": {
"@eslint/js": "^9.4.0",
"@tsconfig/node20": "^20.1.4",
"@types/auto-launch": "^5.0",
"@types/eslint__js": "^8.42.3",
"@types/ffmpeg-static": "^3.0",
"@typescript-eslint/eslint-plugin": "^7",
"@typescript-eslint/parser": "^7",
"concurrently": "^8",
"electron": "^30",
"electron-builder": "25.0.0-alpha.6",
"eslint": "^8",
"electron-builder": "25.0.0-alpha.8",
"eslint": "^9.4.0",
"prettier": "^3",
"prettier-plugin-organize-imports": "^3",
"prettier-plugin-packagejson": "^2",
"shx": "^0.3",
"typescript": "^5"
"typescript": "^5",
"typescript-eslint": "8.0.0-alpha.10"
},
"packageManager": "yarn@1.22.21",
"productName": "ente"
Expand Down
1 change: 0 additions & 1 deletion desktop/src/main/types/any-shell-escape.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* curl -v -H "Location;" -H "User-Agent: FooBar's so-called ""Browser""" "http://www.daveeddy.com/?name=dave&age=24"
Which is suitable for being executed by the shell.
*/
/* eslint-disable no-unused-vars */
declare module "any-shell-escape" {
declare const shellescape: (args: readonly string | string[]) => string;
export default shellescape;
Expand Down
1 change: 0 additions & 1 deletion desktop/src/preload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-unused-vars */
/**
* @file The preload script
*
Expand Down
1 change: 0 additions & 1 deletion desktop/src/thirdparty/clip-bpe-ts/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ export default class {
return token + "</w>";
}

// eslint-disable-next-line no-constant-condition
while (1) {
let bigram: [string, string] | null = null;
let minRank = Infinity;
Expand Down
Loading

0 comments on commit 55ee9a5

Please sign in to comment.