From 53d41d55f769754d6adcd5f051cf6d58c687a521 Mon Sep 17 00:00:00 2001 From: Luciano Alves Date: Sun, 5 Oct 2025 23:18:36 -0300 Subject: [PATCH 1/2] chore: update eslint config --- eslint.config.mjs | 52 +++++++++++++++++++++++------------------------ package.json | 5 ++--- yarn.lock | 19 +++++++++++------ 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index cb5810e95..fe1662ad9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,33 +1,24 @@ -// @ts-check -import eslint from '@eslint/js'; -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import { defineConfig, globalIgnores } from 'eslint/config'; + import globals from 'globals'; -import { join } from 'path'; -import tseslint from 'typescript-eslint'; -export default tseslint.config( - { - ignores: ['eslint.config.mjs', 'packages/**/tests/**', 'packages/**/dist/**'], - }, - eslint.configs.recommended, - ...tseslint.configs.recommendedTypeChecked, - eslintPluginPrettierRecommended, +import js from '@eslint/js'; +import ts from 'typescript-eslint'; + +import prettier from 'eslint-plugin-prettier'; + +import jest from 'eslint-plugin-jest'; + +export default defineConfig([ + globalIgnores(['node_modules', 'coverage', 'dist']), + js.configs.recommended, + ts.configs.recommended, { - languageOptions: { - globals: { - ...globals.node, - ...globals.jest, - }, - ecmaVersion: 5, - sourceType: 'module', - parserOptions: { - projectService: true, - tsconfigRootDir: join(import.meta.dirname, 'packages'), - }, + plugins: { + prettier, }, - }, - { rules: { + ...prettier.configs.recommended.rules, '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/no-unsafe-return': 'off', @@ -43,4 +34,13 @@ export default tseslint.config( '@typescript-eslint/unbound-method': 'off', }, }, -); \ No newline at end of file + { + files: ['**/*.{spec,test}.ts'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + ...jest.configs.recommended, + }, +]); diff --git a/package.json b/package.json index 0877d78aa..c50fe138d 100644 --- a/package.json +++ b/package.json @@ -39,14 +39,13 @@ "@types/normalize-path": "3.0.2", "@types/supertest": "6.0.3", "@types/ws": "8.18.1", - "@typescript-eslint/eslint-plugin": "8.45.0", - "@typescript-eslint/parser": "8.45.0", "class-transformer": "0.5.1", "class-validator": "0.14.2", "eslint": "9.37.0", - "eslint-config-prettier": "10.1.8", "eslint-plugin-import": "2.32.0", + "eslint-plugin-jest": "^29.0.1", "eslint-plugin-prettier": "5.5.4", + "globals": "^16.4.0", "graphql": "16.11.0", "graphql-subscriptions": "3.0.0", "husky": "9.1.7", diff --git a/yarn.lock b/yarn.lock index eea31e5c2..86fa4f82e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3038,7 +3038,7 @@ semver "^7.6.0" ts-api-utils "^2.1.0" -"@typescript-eslint/utils@8.45.0": +"@typescript-eslint/utils@8.45.0", "@typescript-eslint/utils@^8.0.0": version "8.45.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.45.0.tgz#6e68e92d99019fdf56018d0e6664c76a70470c95" integrity sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg== @@ -5100,11 +5100,6 @@ escodegen@^2.1.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@10.1.8: - version "10.1.8" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz#15734ce4af8c2778cc32f0b01b37b0b5cd1ecb97" - integrity sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w== - eslint-import-resolver-node@^0.3.9: version "0.3.9" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" @@ -5146,6 +5141,13 @@ eslint-plugin-import@2.32.0: string.prototype.trimend "^1.0.9" tsconfig-paths "^3.15.0" +eslint-plugin-jest@^29.0.1: + version "29.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-29.0.1.tgz#0f72a81349409d20742208260c9a6cb9efed4df5" + integrity sha512-EE44T0OSMCeXhDrrdsbKAhprobKkPtJTbQz5yEktysNpHeDZTAL1SfDTNKmcFfJkY6yrQLtTKZALrD3j/Gpmiw== + dependencies: + "@typescript-eslint/utils" "^8.0.0" + eslint-plugin-prettier@5.5.4: version "5.5.4" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz#9d61c4ea11de5af704d4edf108c82ccfa7f2e61c" @@ -6157,6 +6159,11 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== +globals@^16.4.0: + version "16.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-16.4.0.tgz#574bc7e72993d40cf27cf6c241f324ee77808e51" + integrity sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw== + globalthis@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" From aaf35c468cfd304a979227dddab4e773ebb787f4 Mon Sep 17 00:00:00 2001 From: Luciano Alves Date: Sun, 5 Oct 2025 23:19:40 -0300 Subject: [PATCH 2/2] chore: update dependencies @types/node --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c50fe138d..089ac22be 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@eslint/js": "9.37.0", "@types/graphql": "14.5.0", "@types/jest": "30.0.0", - "@types/node": "22.18.8", + "@types/node": "24.6.2", "@types/node-fetch": "3.0.3", "@types/normalize-path": "3.0.2", "@types/supertest": "6.0.3", diff --git a/yarn.lock b/yarn.lock index 86fa4f82e..fead66eca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2879,12 +2879,12 @@ dependencies: undici-types "~6.20.0" -"@types/node@22.18.8": - version "22.18.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.18.8.tgz#738d9dafa38f6e0c467687c158f8e1ca2d7d8eaa" - integrity sha512-pAZSHMiagDR7cARo/cch1f3rXy0AEXwsVsVH09FcyeJVAzCnGgmYis7P3JidtTUjyadhTeSo8TgRPswstghDaw== +"@types/node@24.6.2": + version "24.6.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.6.2.tgz#59b99878b6fed17e698e7d09e51c729c5877736a" + integrity sha512-d2L25Y4j+W3ZlNAeMKcy7yDsK425ibcAOO2t7aPTz6gNMH0z2GThtwENCDc0d/Pw9wgyRqE5Px1wkV7naz8ang== dependencies: - undici-types "~6.21.0" + undici-types "~7.13.0" "@types/normalize-package-data@^2.4.0": version "2.4.4" @@ -11272,10 +11272,10 @@ undici-types@~6.20.0: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== -undici-types@~6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" - integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== +undici-types@~7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.13.0.tgz#a20ba7c0a2be0c97bd55c308069d29d167466bff" + integrity sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ== undici@6.21.3: version "6.21.3"