diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..5e3e024376 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,9 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,*.svg,*.css,.codespellrc,locales,pnpm-lock.yaml,i18n,config.ts,extensions.json +check-hidden = true +# Case sensitive names, or phrases (typically non-English), to ignore +# Python style regex. \b is a match at a word boundary +ignore-regex = \b(Manuel|Sie diesen|Sie den|l'authentification)\b +# Case insensitive comma separated list of words to ignore +# ignore-words-list = diff --git a/.eslintignore b/.eslintignore index f1867f4272..30357b9c49 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,6 +10,7 @@ pids # Coverage directory used by tools like istanbul coverage .eslintcache +.eslintrc.js # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git diff --git a/.eslintrc.js b/.eslintrc.js index 50b511d0c9..f95bbbd9fa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,8 +17,9 @@ module.exports = { 'plugin:unicorn/recommended', 'plugin:sonar/recommended', 'plugin:prettier/recommended', + 'plugin:@eslint-react/recommended-legacy', ], - plugins: ['jest'], + plugins: ['@eslint-react', 'jest'], settings: { react: { pragma: 'React', // Pragma to use, default to "React" @@ -45,6 +46,7 @@ module.exports = { // TODO: Opt-in to a stricter ruleset in the future // 'plugin:@typescript-eslint/strict-type-checked', 'plugin:@typescript-eslint/stylistic-type-checked', + 'plugin:@eslint-react/recommended-type-checked-legacy', ], parser: '@typescript-eslint/parser', plugins: [], @@ -71,6 +73,12 @@ module.exports = { // eslint-plugin-import 'import/no-extraneous-dependencies': 0, + // @eslint-react + '@eslint-react/no-class-component': 0, + '@eslint-react/no-complicated-conditional-rendering': 0, + '@eslint-react/no-leaked-conditional-rendering': 0, + '@eslint-react/hooks-extra/ensure-custom-hooks-using-other-hooks': 0, + // sonar 'sonar/no-try-promise': 0, }, @@ -105,7 +113,7 @@ module.exports = { 'react/jsx-filename-extension': 1, 'react/jsx-no-bind': 1, 'react/jsx-props-no-spreading': 0, - 'react/prefer-stateless-function': 1, + 'react/prefer-stateless-function': 0, 'react/static-property-placement': 0, 'react/state-in-constructor': 1, 'react/sort-comp': 0, @@ -134,17 +142,10 @@ module.exports = { 'unicorn/no-null': 0, 'unicorn/prefer-module': 0, 'unicorn/prevent-abbreviations': 0, - 'unicorn/import-style': [ - 2, - { - styles: { - path: { - named: true, - }, - }, - }, - ], + 'unicorn/import-style': 0, 'unicorn/consistent-destructuring': 0, + 'unicorn/no-anonymous-default-export': 0, + 'unicorn/no-array-for-each': 0, // eslint-plugin-sonar 'sonar/function-name': 0, }, diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 26048beba0..0000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "daily" - # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 6ad31da9ee..2002d95b0a 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -54,7 +54,6 @@ jobs: if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} with: node-version-file: '.nvmrc' - cache: 'pnpm' - name: Install node dependencies if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} uses: nick-fields/retry@v3 @@ -176,7 +175,6 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - cache: 'pnpm' - name: Install node dependencies uses: nick-fields/retry@v3 with: @@ -255,7 +253,6 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - cache: 'pnpm' - name: Install node dependencies uses: nick-fields/retry@v3 with: @@ -355,7 +352,6 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - cache: 'pnpm' #TODO - Remove this once https://github.com/electron-userland/electron-builder/issues/6933#issuecomment-1213438889 is resolved - name: Tweak pnpm.cjs run: | diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000000..feadb9a34b --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/.nvmrc b/.nvmrc index 2dbbe00e67..87834047a6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.11.1 +20.12.2 diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 9f26c98d10..0000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "recommendations": [ - "esbenp.prettier-vscode", - "dbaeumer.vscode-eslint", - "codezombiech.gitignore", - "editorconfig.editorconfig", - "steoates.autoimport", - "formulahendry.auto-rename-tag", - "streetsidesoftware.code-spell-checker", - "naumovs.color-highlight", - "mkhl.direnv", - "ms-azuretools.vscode-docker", - "usernamehw.errorlens", - "dsznajder.es7-react-js-snippets", - "mhutchie.git-graph", - "vincaslt.highlight-matching-tag", - "eamodio.gitlens", - "jbockle.jbockle-format-files", - "wix.vscode-import-cost", - "visualstudioexptteam.intellicode-api-usage-examples", - "visualstudioexptteam.vscodeintellicode", - "orta.vscode-jest", - "pkief.material-icon-theme", - "techer.open-in-browser", - "christian-kohler.path-intellisense", - "ofhumanbondage.react-proptypes-intellisense", - "jingkaizhao.vscode-redux-devtools", - "planbcoding.vscode-react-refactor", - "redhat.vscode-yaml" - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 24002a53bf..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "PowerShell Launch Current File", - "type": "PowerShell", - "request": "launch", - "script": "${file}", - "cwd": "${workspaceFolder}" - }, - { - "type": "node", - "request": "launch", - "name": "Ferdium - Test API", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/build/index.js", - "protocol": "inspector", - "env": { - "NODE_ENV": "development", - "DEBUG": "*,-engine.io*,-socket.io*" - } - }, - { - "type": "node", - "request": "launch", - "name": "Ferdium – Live API", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/build/index.js", - "protocol": "inspector", - "env": { - "USE_LIVE_API": "1", - "DEBUG": "*,-engine.io*,-socket.io*" - } - }, - { - "type": "node", - "request": "launch", - "name": "Ferdium – Local API", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/build/index.js", - "protocol": "inspector", - "env": { - "USE_LOCAL_API": "1", - "DEBUG": "*,-engine.io*,-socket.io*" - } - }, - { - "type": "node", - "request": "launch", - "name": "(Win Sim) Ferdium - Test API", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/build/index.js", - "protocol": "inspector", - "env": { - "NODE_ENV": "development", - "OS_PLATFORM": "win32", - "DEBUG": "*,-engine.io*,-socket.io*" - } - }, - { - "type": "node", - "request": "launch", - "name": "(Win Sim) Ferdium – Live API", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/build/index.js", - "protocol": "inspector", - "env": { - "USE_LIVE_API": "1", - "OS_PLATFORM": "win32", - "DEBUG": "*,-engine.io*,-socket.io*" - } - }, - { - "type": "node", - "request": "launch", - "name": "(Win Sim) Ferdium – Local API", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/build/index.js", - "protocol": "inspector", - "env": { - "USE_LOCAL_API": "1", - "OS_PLATFORM": "win32", - "DEBUG": "*,-engine.io*,-socket.io*" - } - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 42a06efe9d..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "prettier.singleQuote": true, - "js/ts.implicitProjectConfig.experimentalDecorators": true, - "yaml.schemas": { - "https://json.schemastore.org/github-issue-config.json": ".github/ISSUE_TEMPLATE/config.yml" - }, - - // "editor.fontFamily": "Fira Code", - // "editor.fontLigatures": true, - "editor.detectIndentation": false, - "editor.guides.bracketPairs": "active", - "editor.codeActionsOnSave": { - "source.fixAll": "explicit", - "source.fixAll.eslint": "explicit" - }, - - // "explorer.confirmDelete": false, - // "explorer.confirmDragAndDrop": false, - - // "eslint.runtime": "node", - "eslint.format.enable": true, - "eslint.workingDirectories": [{ "mode": "auto" }], - // "eslint.packageManager": "npm", - "eslint.validate": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact" - ], - "editor.defaultFormatter": "esbenp.prettier-vscode", - - // "workbench.colorTheme": "Visual Studio Dark", - // "workbench.iconTheme": "material-icon-theme", - - "terminal.integrated.sendKeybindingsToShell": true, - // "terminal.integrated.copyOnSelection": true, - "terminal.integrated.defaultProfile.osx": "zsh", - "terminal.integrated.cursorBlinking": true, - - "git.enableSmartCommit": true, - "diffEditor.ignoreTrimWhitespace": false, - - // "formatFiles.runOrganizeImports": true, - - "javascript.preferences.importModuleSpecifier": "relative", - "typescript.preferences.importModuleSpecifier": "relative" -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 1cc1b79e72..0000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "type": "pnpm", - "script": "dev", - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "type": "pnpm", - "script": "lint", - "group": "test" - } - ] -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b163a61d..6a88c9aa6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -192,7 +192,7 @@ - Fix default accent color to Ferdium gradient - Fix reload after resume and add idle time setting - Don't replace custom icon when service updates -- Workaroud for in-app Password Recovery +- Workaround for in-app Password Recovery - Fix navigation toolbar buttons not being clickable - Fix drag-n-drop not working if the service name is shown - Fix ribbon menu style on windows @@ -225,7 +225,7 @@ - Resurrect the electron-process-manager for Ferdium - Hide sidebar buttons toggled behind a hamburger menu - Add monochromatic Service icons option with Dim adjustment -- Add new service-level option where the user can choose whether to open links in Ferdium or in the default browser. Currently implimented only for discord, skype, steamchat and zoom. +- Add new service-level option where the user can choose whether to open links in Ferdium or in the default browser. Currently implemented only for discord, skype, steamchat and zoom. ### Services diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 887a72a5a3..9d575b15da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,8 +62,8 @@ Currently, these are the combinations of system dependencies that work for MacOS # Note: 'jq' is not a required system dependency; its only here to show the combined output of versions needed $ jq --null-input '[inputs.engines] | add' < ./package.json < ./recipes/package.json { - "node": "20.11.1", - "pnpm": "8.15.5" + "node": "20.12.2", + "pnpm": "8.15.7" } ``` diff --git a/Dockerfile b/Dockerfile index 83baba00bb..efae454d53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Note: Before running this file, you should have already cloned the git repo + submodules on the host machine. This is used when actively developing on your local machine, but you want to build for a different architecture -FROM docker.io/library/node:20.11.1-buster AS builder +FROM docker.io/library/node:20.12.2-buster AS builder ENV PATH="/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/lib:/usr/include:/usr/share" diff --git a/build-helpers/notarize.js b/build-helpers/notarize.js index 32faa97b80..e3fece0b32 100644 --- a/build-helpers/notarize.js +++ b/build-helpers/notarize.js @@ -11,15 +11,14 @@ exports.default = async function notarizing(context) { const appName = context.packager.appInfo.productFilename; - // @ts-ignore global-require + // eslint-disable-next-line global-require const { notarize } = require('@electron/notarize'); await notarize({ tool: 'notarytool', - appBundleId: 'org.ferdium.ferdium-app', appPath: `${appOutDir}/${appName}.app`, teamId: '55E9FPJ93P', - appleId: process.env.APPLEID, - appleIdPassword: process.env.APPLEID_PASSWORD, + appleId: process.env.APPLEID || '', + appleIdPassword: process.env.APPLEID_PASSWORD || '', }); }; diff --git a/docs/MIGRATION.md b/docs/MIGRATION.md index bb1ca315db..a3a02db11a 100644 --- a/docs/MIGRATION.md +++ b/docs/MIGRATION.md @@ -12,7 +12,7 @@ The main advantage of using Ferdi with an account is that you have your configur ## Using Ferdi without an account i.e. Accountless -Accountless instances have all the same functionality as account-based ones with the exception of multi-machine syncronization. If you don't intend to use this app on multiple machines with regularly changing settings and lists of services, there's no benefit to having an online account. Having a backup of your `export.ferdi-data` whenever you make changes to your setup, provides a similarly secure (albeit slower and manual alternative) to automatic syncing that doesn't rely on a server's constant availability. +Accountless instances have all the same functionality as account-based ones with the exception of multi-machine synchronization. If you don't intend to use this app on multiple machines with regularly changing settings and lists of services, there's no benefit to having an online account. Having a backup of your `export.ferdi-data` whenever you make changes to your setup, provides a similarly secure (albeit slower and manual alternative) to automatic syncing that doesn't rely on a server's constant availability. ## Exporting diff --git a/docs/dbus/org.ferdium.Ferdium.xml b/docs/dbus/org.ferdium.Ferdium.xml index 0ee3953289..47da8ee893 100644 --- a/docs/dbus/org.ferdium.Ferdium.xml +++ b/docs/dbus/org.ferdium.Ferdium.xml @@ -22,7 +22,7 @@