From 080d8b05297f3f5afcf33354a40a5201697b1df5 Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Sun, 30 Jul 2023 10:55:59 -0600 Subject: refactor: more lint improvements - set parserOptions.ecmaVersion to latest and env to es2024 in eslint config - install missing types libraries - install eslint-plugin-sonar - enable eslint-plugin-sonar recommended rules and declare jsx-runtime for react in eslint config - clean up disabled lint rules which don't inflict problems anymore - disable various lint issues and fix others --- .eslintrc.js | 24 +-- package.json | 3 + pnpm-lock.yaml | 216 ++++++++++++++++++++- scripts/add-crowdin-contributors.ts | 2 +- scripts/link-readme.ts | 2 +- src/api/UserApi.ts | 2 +- src/api/server/LocalApi.ts | 2 +- src/api/server/ServerApi.ts | 2 +- src/components/auth/Welcome.tsx | 1 + src/components/services/content/ServiceView.tsx | 2 + src/components/services/content/ServiceWebview.tsx | 2 +- .../settings/settings/EditSettingsForm.tsx | 4 +- src/components/ui/Tabs/TabItem.tsx | 4 +- src/components/ui/button/index.tsx | 1 + src/components/ui/select/index.tsx | 38 ++-- src/electron/exception.ts | 1 + src/electron/ipc-api/appIndicator.ts | 2 +- src/electron/ipc-api/download.ts | 2 +- src/electron/ipc-api/localServer.ts | 4 +- src/electron/macOSPermissions.ts | 2 +- src/environment-remote.ts | 2 +- src/environment.ts | 2 +- src/features/appearance/index.ts | 7 +- .../workspaces/components/WorkspacesDashboard.tsx | 1 + .../workspaces/containers/EditWorkspaceScreen.tsx | 3 +- src/helpers/asar-helpers.ts | 2 +- src/helpers/password-helpers.ts | 2 +- src/helpers/recipe-helpers.ts | 2 +- src/helpers/url-helpers.ts | 2 +- src/helpers/userAgent-helpers.ts | 3 +- src/index.ts | 4 +- .../app/Controllers/Http/ImageController.js | 2 +- .../app/Controllers/Http/UserController.js | 8 +- .../app/Controllers/Http/WorkspaceController.js | 7 +- src/internal-server/app/ImageHelper.js | 2 +- src/internal-server/database/factory.js | 1 + src/internal-server/start.ts | 2 +- src/internal-server/start/routes.js | 2 +- src/internal-server/test.ts | 2 +- src/jsUtils.ts | 6 +- src/lib/Menu.ts | 2 +- src/lib/Tray.ts | 2 +- src/models/Recipe.ts | 2 +- src/models/Service.ts | 2 +- src/preload-safe-debug.ts | 4 +- src/stores/AppStore.ts | 2 +- src/stores/ServicesStore.ts | 2 +- src/webview/darkmode.ts | 2 +- src/webview/recipe.ts | 4 +- test/jsUtils.test.ts | 6 +- 50 files changed, 308 insertions(+), 98 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ef8af48c8..94dcbf8e8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,15 +5,17 @@ module.exports = { ecmaFeatures: { jsx: true, }, - ecmaVersion: 2018, + ecmaVersion: 'latest', sourceType: 'module', project: './tsconfig.json', }, ignorePatterns: ['node_modules', 'build', 'recipes'], extends: [ 'airbnb', + 'plugin:react/jsx-runtime', 'plugin:jest/recommended', 'plugin:unicorn/recommended', + 'plugin:sonar/recommended', 'plugin:prettier/recommended', ], plugins: ['jest'], @@ -28,7 +30,7 @@ module.exports = { }, env: { browser: true, - es6: true, + es2024: true, node: true, jest: true, }, @@ -66,7 +68,7 @@ module.exports = { '@typescript-eslint/no-empty-interface': 0, // eslint-plugin-import - 'import/no-extraneous-dependencies': 0, // various false positives, re-enable at some point + 'import/no-extraneous-dependencies': 0, }, }, ], @@ -75,8 +77,6 @@ module.exports = { 'array-callback-return': 1, 'class-methods-use-this': 0, 'consistent-return': 1, - // TODO: Turn this rule on once the js to ts conversions are over - // This is necessary as workaround for window.ferdium vs window['ferdium'] 'no-await-in-loop': 1, 'no-return-assign': 1, 'no-console': [ @@ -94,26 +94,20 @@ module.exports = { 'import/prefer-default-export': 0, 'import/no-unresolved': 0, 'import/no-cycle': 1, - 'import/no-extraneous-dependencies': 0, // various false positives, re-enable at some point + 'import/no-extraneous-dependencies': 0, // eslint-plugin-react 'react/forbid-prop-types': 1, 'react/destructuring-assignment': 0, - 'react/react-in-jsx-scope': 0, 'react/jsx-filename-extension': 1, - 'react/jsx-one-expression-per-line': 0, 'react/jsx-no-bind': 1, 'react/jsx-props-no-spreading': 0, 'react/prefer-stateless-function': 1, - 'react/prop-types': 0, 'react/static-property-placement': 0, 'react/state-in-constructor': 1, 'react/sort-comp': 0, 'react/function-component-definition': 0, - 'react/jsx-no-useless-fragment': 0, - // TODO: [TS DEBT] should remove below config once application converted to TS 'react/default-props-match-prop-types': 0, 'react/require-default-props': 0, - 'react/button-has-type': 0, 'react/no-unused-prop-types': 1, 'react/no-deprecated': 1, // eslint-plugin-jsx-a11y @@ -133,10 +127,8 @@ module.exports = { // eslint-plugin-unicorn 'unicorn/filename-case': 0, 'unicorn/no-null': 0, - 'unicorn/no-useless-undefined': 0, 'unicorn/prefer-module': 0, 'unicorn/prevent-abbreviations': 0, - 'unicorn/prefer-node-protocol': 0, 'unicorn/import-style': [ 2, { @@ -148,7 +140,7 @@ module.exports = { }, ], 'unicorn/consistent-destructuring': 0, - // INFO: Turned off due to src/internal-server/database/factory.js - 'unicorn/no-empty-file': 0, + // eslint-plugin-sonar + 'sonar/function-name': 0, }, }; diff --git a/package.json b/package.json index e3e4a4f44..7bbc85a3d 100644 --- a/package.json +++ b/package.json @@ -135,10 +135,12 @@ "@electron/notarize": "1.2.3", "@formatjs/cli": "6.1.3", "@jest/types": "29.6.1", + "@types/auto-launch": "5.0.2", "@types/color": "3.0.3", "@types/fs-extra": "11.0.1", "@types/jest": "29.5.3", "@types/lodash": "4.14.195", + "@types/minimist": "1.2.2", "@types/ms": "0.7.31", "@types/node": "18.15.3", "@types/prop-types": "15.7.5", @@ -174,6 +176,7 @@ "eslint-plugin-prettier": "5.0.0", "eslint-plugin-react": "7.33.0", "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-sonar": "0.12.0", "eslint-plugin-unicorn": "48.0.0", "gulp-livereload": "4.0.2", "husky": "8.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 17b636a08..5b5d6d836 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -270,6 +270,9 @@ devDependencies: '@jest/types': specifier: 29.6.1 version: 29.6.1 + '@types/auto-launch': + specifier: 5.0.2 + version: 5.0.2 '@types/color': specifier: 3.0.3 version: 3.0.3 @@ -282,6 +285,9 @@ devDependencies: '@types/lodash': specifier: 4.14.195 version: 4.14.195 + '@types/minimist': + specifier: 1.2.2 + version: 1.2.2 '@types/ms': specifier: 0.7.31 version: 0.7.31 @@ -387,6 +393,9 @@ devDependencies: eslint-plugin-react-hooks: specifier: 4.6.0 version: 4.6.0(eslint@8.45.0) + eslint-plugin-sonar: + specifier: 0.12.0 + version: 0.12.0(@babel/core@7.20.5)(@typescript-eslint/parser@6.1.0)(eslint@8.45.0)(typescript@5.0.4) eslint-plugin-unicorn: specifier: 48.0.0 version: 48.0.0(eslint@8.45.0) @@ -677,6 +686,20 @@ packages: - supports-color dev: true + /@babel/eslint-parser@7.22.9(@babel/core@7.20.5)(eslint@8.45.0): + resolution: {integrity: sha512-xdMkt39/nviO/4vpVdrEYPwXCsYIXSSAr6mC7WQsNIlGnuxKyKE7GZjalcnbSWiC4OXGNNN3UQPeHfjSC6sTDA==} + engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} + peerDependencies: + '@babel/core': '>=7.11.0' + eslint: ^7.5.0 || ^8.0.0 + dependencies: + '@babel/core': 7.20.5 + '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 + eslint: 8.45.0 + eslint-visitor-keys: 2.1.0 + semver: 6.3.1 + dev: true + /@babel/generator@7.20.5: resolution: {integrity: sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==} engines: {node: '>=6.9.0'} @@ -2060,6 +2083,12 @@ packages: prop-types: 15.8.1 dev: false + /@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1: + resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} + dependencies: + eslint-scope: 5.1.1 + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2365,6 +2394,10 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true + /@types/auto-launch@5.0.2: + resolution: {integrity: sha512-b03X09+GCM9t6AUECpwA2gUPYs8s5tJHFJw92sK8EiJ7G4QNbsHmXV7nfCfP6G6ivtm230vi4oNfe8AzRgzxMQ==} + dev: true + /@types/babel__core@7.1.20: resolution: {integrity: sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==} dependencies: @@ -2629,6 +2662,34 @@ packages: '@types/node': 18.15.3 optional: true + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@6.1.0)(eslint@8.45.0)(typescript@5.0.4): + resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.6.0 + '@typescript-eslint/parser': 6.1.0(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/utils': 5.62.0(eslint@8.45.0)(typescript@5.0.4) + debug: 4.3.4 + eslint: 8.45.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare-lite: 1.4.0 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.0.4) + typescript: 5.0.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/eslint-plugin@6.1.0(@typescript-eslint/parser@6.1.0)(eslint@8.45.0)(typescript@5.0.4): resolution: {integrity: sha512-qg7Bm5TyP/I7iilGyp6DRqqkt8na00lI6HbjWZObgk3FFSzH5ypRwAHXJhJkwiRtTcfn+xYQIMOR5kJgpo6upw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2688,6 +2749,14 @@ packages: '@typescript-eslint/visitor-keys': 5.59.11 dev: true + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + dev: true + /@typescript-eslint/scope-manager@6.1.0: resolution: {integrity: sha512-AxjgxDn27hgPpe2rQe19k0tXw84YCOsjDJ2r61cIebq1t+AIxbgiXKvD4999Wk49GVaAcdJ/d49FYel+Pp3jjw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2696,6 +2765,26 @@ packages: '@typescript-eslint/visitor-keys': 6.1.0 dev: true + /@typescript-eslint/type-utils@5.62.0(eslint@8.45.0)(typescript@5.0.4): + resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) + '@typescript-eslint/utils': 5.62.0(eslint@8.45.0)(typescript@5.0.4) + debug: 4.3.4 + eslint: 8.45.0 + tsutils: 3.21.0(typescript@5.0.4) + typescript: 5.0.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/type-utils@6.1.0(eslint@8.45.0)(typescript@5.0.4): resolution: {integrity: sha512-kFXBx6QWS1ZZ5Ni89TyT1X9Ag6RXVIVhqDs0vZE/jUeWlBv/ixq2diua6G7ece6+fXw3TvNRxP77/5mOMusx2w==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2721,6 +2810,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@typescript-eslint/types@6.1.0: resolution: {integrity: sha512-+Gfd5NHCpDoHDOaU/yIF3WWRI2PcBRKKpP91ZcVbL0t5tQpqYWBs3z/GGhvU+EV1D0262g9XCnyqQh19prU0JQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2747,6 +2841,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.0.4): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.0.4) + typescript: 5.0.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree@6.1.0(typescript@5.0.4): resolution: {integrity: sha512-nUKAPWOaP/tQjU1IQw9sOPCDavs/iU5iYLiY/6u7gxS7oKQoi4aUxXS1nrrVGTyBBaGesjkcwwHkbkiD5eBvcg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2788,6 +2903,26 @@ packages: - typescript dev: true + /@typescript-eslint/utils@5.62.0(eslint@8.45.0)(typescript@5.0.4): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) + eslint: 8.45.0 + eslint-scope: 5.1.1 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/utils@6.1.0(eslint@8.45.0)(typescript@5.0.4): resolution: {integrity: sha512-wp652EogZlKmQoMS5hAvWqRKplXvkuOnNzZSE0PVvsKjpexd/XznRVHAtrfHFYmqaJz0DFkjlDsGYC9OXw+OhQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2815,6 +2950,14 @@ packages: eslint-visitor-keys: 3.4.1 dev: true + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.1 + dev: true + /@typescript-eslint/visitor-keys@6.1.0: resolution: {integrity: sha512-yQeh+EXhquh119Eis4k0kYhj9vmFzNpbhM3LftWQVwqVjipCkwHBQOZutcYW+JVkjtTG9k8nrZU1UoNedPDd1A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3878,7 +4021,6 @@ packages: /bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - dev: false /cacache@15.3.0: resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} @@ -5660,6 +5802,41 @@ packages: string.prototype.matchall: 4.0.8 dev: true + /eslint-plugin-sonar@0.12.0(@babel/core@7.20.5)(@typescript-eslint/parser@6.1.0)(eslint@8.45.0)(typescript@5.0.4): + resolution: {integrity: sha512-49linjQRXazFXZR4PXHwgMkkrnLavZTeSkxJ5+k3PoNqGm/shgJCVmdQAki3AJNqM+huZSwYxwsWS+LSpB48cQ==} + engines: {node: '>=14'} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: ^4.0.0 || ^5.0.0 + dependencies: + '@babel/eslint-parser': 7.22.9(@babel/core@7.20.5)(eslint@8.45.0) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@6.1.0)(eslint@8.45.0)(typescript@5.0.4) + builtin-modules: 3.3.0 + bytes: 3.1.2 + eslint: 8.45.0 + eslint-plugin-react: 7.33.0(eslint@8.45.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.45.0) + eslint-plugin-sonarjs: 0.19.0(eslint@8.45.0) + functional-red-black-tree: 1.0.1 + regexpp: 3.2.0 + scslre: 0.2.0 + tmp: 0.2.1 + typescript: 5.0.4 + transitivePeerDependencies: + - '@babel/core' + - '@typescript-eslint/parser' + - supports-color + dev: true + + /eslint-plugin-sonarjs@0.19.0(eslint@8.45.0): + resolution: {integrity: sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw==} + engines: {node: '>=14'} + peerDependencies: + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.45.0 + dev: true + /eslint-plugin-unicorn@48.0.0(eslint@8.45.0): resolution: {integrity: sha512-8fk/v3p1ro34JSVDBEmtOq6EEQRpMR0iTir79q69KnXFZ6DJyPkT3RAi+ZoTqhQMdDSpGh8BGR68ne1sP5cnAA==} engines: {node: '>=16'} @@ -5700,6 +5877,11 @@ packages: estraverse: 5.3.0 dev: true + /eslint-visitor-keys@2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + dev: true + /eslint-visitor-keys@3.4.1: resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6384,6 +6566,10 @@ packages: functions-have-names: 1.2.3 dev: true + /functional-red-black-tree@1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + dev: true + /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true @@ -10691,6 +10877,13 @@ packages: strip-indent: 3.0.0 dev: true + /refa@0.11.0: + resolution: {integrity: sha512-486O8/pQXwj9jV0mVvUnTsxq0uknpBnNJ0eCUhkZqJRQ8KutrT1PhzmumdCeM1hSBF2eMlFPmwECRER4IbKXlQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dependencies: + '@eslint-community/regexpp': 4.6.0 + dev: true + /regenerator-runtime@0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} @@ -10702,6 +10895,14 @@ packages: safe-regex: 1.1.0 dev: false + /regexp-ast-analysis@0.6.0: + resolution: {integrity: sha512-OLxjyjPkVH+rQlBLb1I/P/VTmamSjGkvN5PTV5BXP432k3uVz727J7H29GA5IFiY0m7e1xBN7049Wn59FY3DEQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dependencies: + '@eslint-community/regexpp': 4.6.0 + refa: 0.11.0 + dev: true + /regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -10716,6 +10917,11 @@ packages: functions-have-names: 1.2.3 dev: true + /regexpp@3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + dev: true + /regjsparser@0.10.0: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true @@ -11046,6 +11252,14 @@ packages: resolution: {integrity: sha512-FaHoAk75AYhT+rnBmMpkvHSIcQma4OHzYXOhn1XXtgNomi0FTV8YEXYuh2EIdCg5IKMVyFbXeJT4Cn96+fzABg==} dev: false + /scslre@0.2.0: + resolution: {integrity: sha512-4hc49fUMmX3jM0XdFUAPBrs1xwEcdHa0KyjEsjFs+Zfc66mpFpq5YmRgDtl+Ffo6AtJIilfei+yKw8fUn3N88w==} + dependencies: + '@eslint-community/regexpp': 4.6.0 + refa: 0.11.0 + regexp-ast-analysis: 0.6.0 + dev: true + /seek-bzip@1.0.6: resolution: {integrity: sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==} hasBin: true diff --git a/scripts/add-crowdin-contributors.ts b/scripts/add-crowdin-contributors.ts index 7a0d0e769..217de8cef 100644 --- a/scripts/add-crowdin-contributors.ts +++ b/scripts/add-crowdin-contributors.ts @@ -1,5 +1,5 @@ import fs from 'fs-extra'; -import path from 'path'; +import path from 'node:path'; import allContributors from 'all-contributors-cli'; /** diff --git a/scripts/link-readme.ts b/scripts/link-readme.ts index d80739178..47440f699 100644 --- a/scripts/link-readme.ts +++ b/scripts/link-readme.ts @@ -7,7 +7,7 @@ */ import fs from 'fs-extra'; -import path from 'path'; +import path from 'node:path'; console.log('Linking issues and PRs in README.md'); diff --git a/src/api/UserApi.ts b/src/api/UserApi.ts index 31c8acead..2b319207a 100644 --- a/src/api/UserApi.ts +++ b/src/api/UserApi.ts @@ -1,4 +1,4 @@ -import { BinaryLike } from 'crypto'; +import { BinaryLike } from 'node:crypto'; import { hash } from '../helpers/password-helpers'; export default class UserApi { diff --git a/src/api/server/LocalApi.ts b/src/api/server/LocalApi.ts index a292bc42d..6764816f9 100644 --- a/src/api/server/LocalApi.ts +++ b/src/api/server/LocalApi.ts @@ -1,4 +1,4 @@ -import { ExecException } from 'child_process'; +import { ExecException } from 'node:child_process'; import { ipcRenderer } from 'electron'; import fastFolderSize from 'fast-folder-size'; diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts index de8e0a85c..7b17fcdcd 100644 --- a/src/api/server/ServerApi.ts +++ b/src/api/server/ServerApi.ts @@ -1,6 +1,6 @@ /* eslint-disable import/no-import-module-exports */ /* eslint-disable global-require */ -import { join } from 'path'; +import { join } from 'node:path'; import tar from 'tar'; import { readdirSync, diff --git a/src/components/auth/Welcome.tsx b/src/components/auth/Welcome.tsx index 047512ea4..259e3c335 100644 --- a/src/components/auth/Welcome.tsx +++ b/src/components/auth/Welcome.tsx @@ -91,6 +91,7 @@ class Welcome extends Component { className="settings__hr-sections" style={{ marginTop: 24, marginBottom: 24, borderStyle: 'solid' }} /> + {/* eslint-disable-next-line react/button-has-type */}