Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Oxfmt
install: normal
command: "lint:fmt"
- name: ESLint
- name: Oxlint
install: normal
command: "lint:js"
- name: Style Lint
Expand Down
3 changes: 2 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"*": "oxfmt --no-error-on-unmatched-pattern"
"*": "oxfmt --no-error-on-unmatched-pattern",
"*.{js,jsx,ts,tsx,mjs,cjs}": "oxlint --no-error-on-unmatched-pattern"
}
97 changes: 0 additions & 97 deletions apps/desktop/.eslintrc.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions apps/desktop/.lintstagedrc

This file was deleted.

7 changes: 7 additions & 0 deletions apps/desktop/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
Copyright 2026 Element Creations Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

module.exports = {
presets: [["@babel/preset-env", { targets: { node: "current" } }], "@babel/preset-typescript"],
};
7 changes: 7 additions & 0 deletions apps/desktop/electron-builder.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
Copyright 2026 Element Creations Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

import * as os from "node:os";
import * as fs from "node:fs";
import * as path from "node:path";
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/hak/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lib": ["es2022"],
"types": ["node"],
"allowImportingTsExtensions": true,
"skipLibCheck": true
"skipLibCheck": true,
"noEmit": true
},
"include": ["../scripts/@types/*.d.ts", "./**/*.ts"]
}
16 changes: 2 additions & 14 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
"fetch": "pnpm run mkdirs && node scripts/fetch-package.ts",
"asar-webapp": "asar p webapp webapp.asar",
"start": "nx start",
"lint": "pnpm lint:types && pnpm lint:js",
"lint:js": "eslint --max-warnings 0 src hak playwright scripts",
"lint:js-fix": "eslint --fix --max-warnings 0 src hak playwright scripts",
"lint": "pnpm lint:types",
"lint:types": "pnpm lint:types:src && pnpm lint:types:node && pnpm lint:types:test && pnpm lint:types:scripts && pnpm lint:types:hak",
"lint:types:src": "tsc --noEmit",
"lint:types:node": "tsc --noEmit -p tsconfig.node.json",
Expand Down Expand Up @@ -75,27 +73,18 @@
"@electron/asar": "4.2.0",
"@electron/fuses": "^2.1.1",
"@playwright/test": "catalog:",
"@stylistic/eslint-plugin": "^5.0.0",
"@types/auto-launch": "^5.0.1",
"@types/counterpart": "^0.18.1",
"@types/minimist": "^1.2.1",
"@types/node": "catalog:",
"@types/pacote": "^11.1.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"app-builder-lib": "26.15.3",
"chokidar": "^5.0.0",
"detect-libc": "^2.0.0",
"electron": "43.0.0",
"electron-builder": "26.15.3",
"electron-builder-squirrel-windows": "26.15.3",
"electron-devtools-installer": "^4.0.0",
"eslint": "^8.26.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-matrix-org": "^3.0.0",
"eslint-plugin-n": "^17.12.0",
"eslint-plugin-unicorn": "^56.0.0",
"glob": "^13.0.0",
"matrix-web-i18n": "catalog:",
"memfs": "^4.57.2",
Expand All @@ -112,8 +101,7 @@
},
"nx": {
"includedScripts": [
"lint:types",
"lint:js"
"lint:types"
]
}
}
7 changes: 7 additions & 0 deletions apps/desktop/scripts/copy-res.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env node

/*
Copyright 2026 Element Creations Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

// copies resources into the lib directory.

import parseArgs from "minimist";
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/scripts/fetch-package.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env node
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

import * as path from "node:path";
import { createWriteStream, promises as fs } from "node:fs";
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/scripts/generate-nightly-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env node
/*
Copyright 2026 Element Creations Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

/**
* Script to generate incremental Nightly build versions, based on the latest Nightly build version of that kind.
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/scripts/get-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env node
/*
Copyright 2026 Element Creations Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

/*
* Checks for the presence of a webapp, inspects its version and prints it
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/scripts/set-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env node
/*
Copyright 2026 Element Creations Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/

/*
* Checks for the presence of a webapp, inspects its version and sets the
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"strict": true,
"lib": ["es2022"],
"types": ["node"],
"allowImportingTsExtensions": true
"allowImportingTsExtensions": true,
"noEmit": true
},
"include": ["../src/@types", "./**/*.ts"]
}
2 changes: 2 additions & 0 deletions apps/desktop/src/electron-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,13 @@ app.on("ready", async () => {
desktopCapturer
.getSources({ types: ["screen", "window"] })
.then((sources) => {
// oxlint-disable-next-line promise/no-callback-in-promise
callback({ video: sources[0] });
})
.catch((err) => {
// If the user cancels the dialog an error occurs "Failed to get sources"
console.error("Wayland: failed to get user-selected source:", err);
// oxlint-disable-next-line promise/no-callback-in-promise
callback({ video: { id: "", name: "" } }); // The promise does not return if no dummy is passed here as source
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
}));
break;
case "callDisplayMediaCallback":
await getDisplayMediaCallback()?.({ video: args[0] });
getDisplayMediaCallback()?.({ video: args[0] });

Check warning on line 147 in apps/desktop/src/ipc.ts

View workflow job for this annotation

GitHub Actions / Tests

Uncovered Line

Line 147 is not covered by tests
setDisplayMediaCallback(null);
ret = null;
break;
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src/language-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@
locales = [locales];
}

const loadedLocales = locales.filter((locale) => {
const chosenLocale = locales.find((locale) => {

Check warning on line 116 in apps/desktop/src/language-helper.ts

View workflow job for this annotation

GitHub Actions / Tests

Uncovered Line

Line 116 is not covered by tests
const translations = this.fetchTranslationJson(locale);
if (translations !== null) {
counterpart.registerTranslations(locale, translations);
}
return !!translations;
});

counterpart.setLocale(loadedLocales[0]);
counterpart.setLocale(chosenLocale!);

Check warning on line 124 in apps/desktop/src/language-helper.ts

View workflow job for this annotation

GitHub Actions / Tests

Uncovered Line

Line 124 is not covered by tests
this.store.set(AppLocalization.STORE_KEY, locales);

this.resetLocalizedUI();
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/preload.cts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.

// This file is compiled to CommonJS rather than ESM otherwise the browser chokes on the import statement.

import { ipcRenderer, contextBridge, IpcRendererEvent } from "electron";
import { ipcRenderer, contextBridge, type IpcRendererEvent } from "electron";
import type { ConfigOptions } from "./config.js" with { "resolution-mode": "import" };

// Expose only expected IPC wrapper APIs to the renderer process to avoid
Expand Down
18 changes: 0 additions & 18 deletions apps/web/.eslintignore

This file was deleted.

Loading
Loading