From c29fb7dc0edbf23f65bef7bb3657cf1fb618bc3a Mon Sep 17 00:00:00 2001 From: Mohamed-Elshesheny Date: Mon, 20 Apr 2026 17:20:55 +0200 Subject: [PATCH 1/4] chore(backend): update package dependencies and configurations - Updated packageManager in package.json to pnpm@10.33.0. - Upgraded typescript-eslint and related packages to version 8.58.2 in pnpm-lock.yaml and package.json. - Added new global environment variable DB_FILE_NAME in turbo.json. - Improved enum validation in drizzle.ts for better type safety. - Enhanced ESLint configuration in base.js to include globals and updated rules for unused variables. --- apps/backend/src/utils/drizzle.ts | 2 +- package.json | 2 +- packages/eslint-config/base.js | 31 ++++- packages/eslint-config/package.json | 2 +- pnpm-lock.yaml | 190 ++++++++++++++++++++++++++-- turbo.json | 2 +- 6 files changed, 209 insertions(+), 20 deletions(-) diff --git a/apps/backend/src/utils/drizzle.ts b/apps/backend/src/utils/drizzle.ts index 012ee3c..286f3d8 100644 --- a/apps/backend/src/utils/drizzle.ts +++ b/apps/backend/src/utils/drizzle.ts @@ -14,7 +14,7 @@ export const enumType = (values: T, name?: string) return 'text'; }, toDriver(value) { - if (!values.includes(value as any)) { + if (!(values as readonly string[]).includes(value)) { throw new Error(`Invalid enum value: ${value}. Allowed values are: ${values.join(', ')}`); } return value; diff --git a/package.json b/package.json index 33b033b..6e35941 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "turbo": "^2.9.3", "typescript": "^6.0.2" }, - "packageManager": "pnpm@10.27.0", + "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319", "engines": { "node": ">=18" }, diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js index 8944f70..a580e38 100644 --- a/packages/eslint-config/base.js +++ b/packages/eslint-config/base.js @@ -3,11 +3,12 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import js from "@eslint/js"; -import eslintConfigPrettier from "eslint-config-prettier"; -import turboPlugin from "eslint-plugin-turbo"; -import tseslint from "typescript-eslint"; -import onlyWarn from "eslint-plugin-only-warn"; +import js from '@eslint/js'; +import eslintConfigPrettier from 'eslint-config-prettier'; +import turboPlugin from 'eslint-plugin-turbo'; +import tseslint from 'typescript-eslint'; +import onlyWarn from 'eslint-plugin-only-warn'; +import globals from 'globals'; /** * A shared ESLint configuration for the repository. @@ -18,12 +19,28 @@ export const config = [ js.configs.recommended, eslintConfigPrettier, ...tseslint.configs.recommended, + { + languageOptions: { + globals: { + ...globals.node, + }, + }, + rules: { + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + argsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + }, + }, { plugins: { turbo: turboPlugin, }, rules: { - "turbo/no-undeclared-env-vars": "warn", + 'turbo/no-undeclared-env-vars': 'warn', }, }, { @@ -32,6 +49,6 @@ export const config = [ }, }, { - ignores: ["dist/**"], + ignores: ['dist/**'], }, ]; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 011d1ee..78301d9 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -19,6 +19,6 @@ "eslint-plugin-turbo": "^2.8.16", "globals": "^17.4.0", "typescript": "^6.0.2", - "typescript-eslint": "^8.57.0" + "typescript-eslint": "^8.58.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc22c68..42c490b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -647,8 +647,8 @@ importers: specifier: ^6.0.2 version: 6.0.2 typescript-eslint: - specifier: ^8.57.0 - version: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + specifier: ^8.58.2 + version: 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) packages/lib: dependencies: @@ -4540,6 +4540,14 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/eslint-plugin@8.58.2': + resolution: {integrity: sha512-aC2qc5thQahutKjP+cl8cgN9DWe3ZUqVko30CMSZHnFEHyhOYoZSzkGtAI2mcwZ38xeImDucI4dnqsHiOYuuCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.58.2 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/parser@8.57.1': resolution: {integrity: sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4547,22 +4555,45 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser@8.58.2': + resolution: {integrity: sha512-/Zb/xaIDfxeJnvishjGdcR4jmr7S+bda8PKNhRGdljDM+elXhlvN0FyPSsMnLmJUrVG9aPO6dof80wjMawsASg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/project-service@8.57.1': resolution: {integrity: sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/project-service@8.58.2': + resolution: {integrity: sha512-Cq6UfpZZk15+r87BkIh5rDpi38W4b+Sjnb8wQCPPDDweS/LRCFjCyViEbzHk5Ck3f2QDfgmlxqSa7S7clDtlfg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/scope-manager@8.57.1': resolution: {integrity: sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.58.2': + resolution: {integrity: sha512-SgmyvDPexWETQek+qzZnrG6844IaO02UVyOLhI4wpo82dpZJY9+6YZCKAMFzXb7qhx37mFK1QcPQ18tud+vo6Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/tsconfig-utils@8.57.1': resolution: {integrity: sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/tsconfig-utils@8.58.2': + resolution: {integrity: sha512-3SR+RukipDvkkKp/d0jP0dyzuls3DbGmwDpVEc5wqk5f38KFThakqAAO0XMirWAE+kT00oTauTbzMFGPoAzB0A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/type-utils@8.57.1': resolution: {integrity: sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4570,24 +4601,37 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.57.1': - resolution: {integrity: sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==} + '@typescript-eslint/type-utils@8.58.2': + resolution: {integrity: sha512-Z7EloNR/B389FvabdGeTo2XMs4W9TjtPiO9DAsmT0yom0bwlPyRjkJ1uCdW1DvrrrYP50AJZ9Xc3sByZA9+dcg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.57.2': - resolution: {integrity: sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==} + '@typescript-eslint/types@8.57.1': + resolution: {integrity: sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/types@8.58.1': resolution: {integrity: sha512-io/dV5Aw5ezwzfPBBWLoT+5QfVtP8O7q4Kftjn5azJ88bYyp/ZMCsyW1lpKK46EXJcaYMZ1JtYj+s/7TdzmQMw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.58.2': + resolution: {integrity: sha512-9TukXyATBQf/Jq9AMQXfvurk+G5R2MwfqQGDR2GzGz28HvY/lXNKGhkY+6IOubwcquikWk5cjlgPvD2uAA7htQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.57.1': resolution: {integrity: sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/typescript-estree@8.58.2': + resolution: {integrity: sha512-ELGuoofuhhoCvNbQjFFiobFcGgcDCEm0ThWdmO4Z0UzLqPXS3KFvnEZ+SHewwOYHjM09tkzOWXNTv9u6Gqtyuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/utils@8.57.1': resolution: {integrity: sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4595,10 +4639,21 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/utils@8.58.2': + resolution: {integrity: sha512-QZfjHNEzPY8+l0+fIXMvuQ2sJlplB4zgDZvA+NmvZsZv3EQwOcc1DuIU1VJUTWZ/RKouBMhDyNaBMx4sWvrzRA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/visitor-keys@8.57.1': resolution: {integrity: sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.58.2': + resolution: {integrity: sha512-f1WO2Lx8a9t8DARmcWAUPJbu0G20bJlj8L4z72K00TMeJAoyLr/tHhI/pzYBLrR4dXWkcxO1cWYZEOX8DKHTqA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@uiw/color-convert@2.9.6': resolution: {integrity: sha512-w8TpU3MRcquurQJxWR1daKcRygu/a0hLP/VGsLMA3ebb41sAZGxMQLHtS+zC/e3ciFNB7BbPrSPlzOcz6w6cRg==} peerDependencies: @@ -8662,6 +8717,12 @@ packages: peerDependencies: typescript: '>=4.8.4' + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -8740,6 +8801,13 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' + typescript-eslint@8.58.2: + resolution: {integrity: sha512-V8iSng9mRbdZjl54VJ9NKr6ZB+dW0J3TzRXRGcSbLIej9jV86ZRtlYeTKDR/QLxXykocJ5icNzbsl2+5TzIvcQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + typescript@6.0.2: resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} engines: {node: '>=14.17'} @@ -13187,6 +13255,22 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.58.2 + '@typescript-eslint/type-utils': 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/utils': 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.58.2 + eslint: 10.1.0(jiti@2.6.1) + ignore: 7.0.5 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@typescript-eslint/scope-manager': 8.57.1 @@ -13199,10 +13283,31 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.58.2 + '@typescript-eslint/types': 8.58.2 + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.58.2 + debug: 4.4.3 + eslint: 10.1.0(jiti@2.6.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/project-service@8.57.1(typescript@6.0.2)': dependencies: '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@6.0.2) - '@typescript-eslint/types': 8.57.2 + '@typescript-eslint/types': 8.58.1 + debug: 4.4.3 + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.58.2(typescript@6.0.2)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.2) + '@typescript-eslint/types': 8.58.2 debug: 4.4.3 typescript: 6.0.2 transitivePeerDependencies: @@ -13213,10 +13318,19 @@ snapshots: '@typescript-eslint/types': 8.57.1 '@typescript-eslint/visitor-keys': 8.57.1 + '@typescript-eslint/scope-manager@8.58.2': + dependencies: + '@typescript-eslint/types': 8.58.2 + '@typescript-eslint/visitor-keys': 8.58.2 + '@typescript-eslint/tsconfig-utils@8.57.1(typescript@6.0.2)': dependencies: typescript: 6.0.2 + '@typescript-eslint/tsconfig-utils@8.58.2(typescript@6.0.2)': + dependencies: + typescript: 6.0.2 + '@typescript-eslint/type-utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@typescript-eslint/types': 8.57.1 @@ -13229,12 +13343,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.57.1': {} + '@typescript-eslint/type-utils@8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/types': 8.58.2 + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) + '@typescript-eslint/utils': 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + debug: 4.4.3 + eslint: 10.1.0(jiti@2.6.1) + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color - '@typescript-eslint/types@8.57.2': {} + '@typescript-eslint/types@8.57.1': {} '@typescript-eslint/types@8.58.1': {} + '@typescript-eslint/types@8.58.2': {} + '@typescript-eslint/typescript-estree@8.57.1(typescript@6.0.2)': dependencies: '@typescript-eslint/project-service': 8.57.1(typescript@6.0.2) @@ -13250,6 +13376,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.58.2(typescript@6.0.2)': + dependencies: + '@typescript-eslint/project-service': 8.58.2(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.2) + '@typescript-eslint/types': 8.58.2 + '@typescript-eslint/visitor-keys': 8.58.2 + debug: 4.4.3 + minimatch: 10.2.5 + semver: 7.7.4 + tinyglobby: 0.2.16 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) @@ -13261,11 +13402,27 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.58.2 + '@typescript-eslint/types': 8.58.2 + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) + eslint: 10.1.0(jiti@2.6.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.57.1': dependencies: '@typescript-eslint/types': 8.57.1 eslint-visitor-keys: 5.0.1 + '@typescript-eslint/visitor-keys@8.58.2': + dependencies: + '@typescript-eslint/types': 8.58.2 + eslint-visitor-keys: 5.0.1 + '@uiw/color-convert@2.9.6(@babel/runtime@7.29.2)': dependencies: '@babel/runtime': 7.29.2 @@ -17824,6 +17981,10 @@ snapshots: dependencies: typescript: 6.0.2 + ts-api-utils@2.5.0(typescript@6.0.2): + dependencies: + typescript: 6.0.2 + ts-dedent@2.2.0: {} tslib@2.8.1: {} @@ -17934,6 +18095,17 @@ snapshots: transitivePeerDependencies: - supports-color + typescript-eslint@8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/parser': 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) + '@typescript-eslint/utils': 8.58.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + eslint: 10.1.0(jiti@2.6.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + typescript@6.0.2: {} uglify-js@3.19.3: diff --git a/turbo.json b/turbo.json index e972b88..8239b48 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,6 @@ { "$schema": "https://turborepo.com/schema.json", - "globalEnv": ["VITE_BACKEND_URL"], + "globalEnv": ["VITE_BACKEND_URL", "DB_FILE_NAME"], "ui": "tui", "tasks": { "build": { From 8fe5770fef4d83386cdc93c5f484c5cfc67e4904 Mon Sep 17 00:00:00 2001 From: Mohamed-Elshesheny Date: Mon, 20 Apr 2026 17:30:18 +0200 Subject: [PATCH 2/4] chore(workflows): remove version specification for pnpm setup in CI configurations - Updated .github/workflows/license-header.yml and .github/workflows/release.yml to remove the explicit version setting for pnpm in the setup step, allowing for the latest version to be used. --- .github/workflows/license-header.yml | 2 -- .github/workflows/release.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml index a272ef0..a2ef3b2 100644 --- a/.github/workflows/license-header.yml +++ b/.github/workflows/license-header.yml @@ -21,8 +21,6 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 10.27.0 - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c844de..6de4421 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,8 +48,6 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 10.27.0 - name: Install dependencies run: pnpm install --frozen-lockfile From da43079a8395d124dbe074c6519fd7d71915235c Mon Sep 17 00:00:00 2001 From: Mohamed-Elshesheny Date: Mon, 20 Apr 2026 17:47:34 +0200 Subject: [PATCH 3/4] feat(eslint-config): add Vite configuration and enhance global definitions - Introduced a new Vite configuration file for ESLint. - Updated the ESLint configuration to include Node globals alongside browser globals for improved compatibility. --- packages/eslint-config/package.json | 3 ++- packages/eslint-config/vite.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 78301d9..d049890 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -6,7 +6,8 @@ "exports": { "./base": "./base.js", "./next-js": "./next.js", - "./react-internal": "./react-internal.js" + "./react-internal": "./react-internal.js", + "./vite": "./vite.js" }, "devDependencies": { "@eslint/js": "^10.0.1", diff --git a/packages/eslint-config/vite.js b/packages/eslint-config/vite.js index bb1bdc9..eb5128d 100644 --- a/packages/eslint-config/vite.js +++ b/packages/eslint-config/vite.js @@ -16,7 +16,10 @@ export default tseslint.config({ ignores: ['dist'], languageOptions: { ecmaVersion: 2020, - globals: globals.browser, + globals: { + ...globals.browser, + ...globals.node, + }, }, plugins: { 'react-hooks': reactHooks, From 3a7b5d849af965904c410bccc5aee97110c5aeed Mon Sep 17 00:00:00 2001 From: Mohamed-Elshesheny Date: Mon, 20 Apr 2026 17:55:14 +0200 Subject: [PATCH 4/4] refactor(eslint-config): update Vite ESLint configuration to use defineConfig - Refactored the ESLint configuration for Vite to utilize the defineConfig function for improved clarity and structure. - Enhanced global definitions by separating browser and Node globals into distinct language options. - Maintained existing rules and plugins while ensuring compatibility with TypeScript and React. --- packages/eslint-config/vite.js | 58 ++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/packages/eslint-config/vite.js b/packages/eslint-config/vite.js index eb5128d..5d3f701 100644 --- a/packages/eslint-config/vite.js +++ b/packages/eslint-config/vite.js @@ -4,36 +4,46 @@ */ import js from '@eslint/js'; +import { defineConfig } from 'eslint/config'; import globals from 'globals'; import reactHooks from 'eslint-plugin-react-hooks'; import reactRefresh from 'eslint-plugin-react-refresh'; import tseslint from 'typescript-eslint'; import pluginQuery from '@tanstack/eslint-plugin-query'; -export default tseslint.config({ - extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ['**/*.{ts,tsx}'], - ignores: ['dist'], - languageOptions: { - ecmaVersion: 2020, - globals: { - ...globals.browser, - ...globals.node, +export default defineConfig( + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + ignores: ['dist'], + languageOptions: { + ecmaVersion: 2020, + globals: { + ...globals.browser, + }, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + '@tanstack/query': pluginQuery, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], + 'react/react-in-jsx-scope': 'off', + 'react/prop-types': 'off', + 'react-hooks/exhaustive-deps': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'no-empty-pattern': 'off', }, }, - plugins: { - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, - '@tanstack/query': pluginQuery, - }, - rules: { - ...reactHooks.configs.recommended.rules, - 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], - 'react/react-in-jsx-scope': 'off', - 'react/prop-types': 'off', - 'react-hooks/exhaustive-deps': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'no-empty-pattern': 'off', + { + files: ['**/*.config.{js,mjs,cjs,ts,mts,cts}', '**/vite.config.{js,mjs,cjs,ts,mts,cts}'], + languageOptions: { + globals: { + ...globals.node, + }, + }, }, -}); +);