diff --git a/.eslintrc.json b/.eslintrc.json index 2d3cbbee3d..e53925b709 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,7 +20,8 @@ "prettier", "react-hooks", "import", - "vitest" + "vitest", + "eslint-plugin-react-compiler" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -31,6 +32,7 @@ } }, "rules": { + "react-compiler/react-compiler": "warn", "eqeqeq": "error", "no-var": "error", "prefer-const": "error", diff --git a/package.json b/package.json index b8196ab6a3..9255bd14b0 100644 --- a/package.json +++ b/package.json @@ -237,6 +237,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.2", + "eslint-plugin-react-compiler": "0.0.0-experimental-51a85ea-20240601", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-vitest": "^0.5.4", "immer": "^10.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b45a98a06..a9e2b36e25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,6 +100,9 @@ devDependencies: eslint-plugin-react: specifier: ^7.34.2 version: 7.34.2(eslint@8.57.0) + eslint-plugin-react-compiler: + specifier: 0.0.0-experimental-51a85ea-20240601 + version: 0.0.0-experimental-51a85ea-20240601(eslint@8.57.0) eslint-plugin-react-hooks: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) @@ -481,6 +484,18 @@ packages: '@babel/helper-plugin-utils': 7.24.6 dev: true + /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.24.6): + resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} + engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.24.6 + '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) + '@babel/helper-plugin-utils': 7.24.6 + dev: true + /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.6): resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} @@ -3043,7 +3058,7 @@ packages: dependencies: semver: 7.6.2 shelljs: 0.8.5 - typescript: 5.6.0-dev.20240604 + typescript: 5.6.0-dev.20240620 dev: true /electron-to-chromium@1.4.789: @@ -3364,6 +3379,23 @@ packages: synckit: 0.8.8 dev: true + /eslint-plugin-react-compiler@0.0.0-experimental-51a85ea-20240601(eslint@8.57.0): + resolution: {integrity: sha512-ROiKTVu9pZsNHyJepZj/JULWnkw8+I8+9gOF/MkJ8Q22/9f9MkPQkD2f6FXzVH+iyWbp7DQ3RXKhB3hWhf8AIg==} + engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} + peerDependencies: + eslint: '>=7' + dependencies: + '@babel/core': 7.24.6 + '@babel/parser': 7.24.6 + '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.24.6) + eslint: 8.57.0 + hermes-parser: 0.20.1 + zod: 3.23.8 + zod-validation-error: 3.3.0(zod@3.23.8) + transitivePeerDependencies: + - supports-color + dev: true + /eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} engines: {node: '>=10'} @@ -3809,6 +3841,16 @@ packages: function-bind: 1.1.2 dev: true + /hermes-estree@0.20.1: + resolution: {integrity: sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg==} + dev: true + + /hermes-parser@0.20.1: + resolution: {integrity: sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA==} + dependencies: + hermes-estree: 0.20.1 + dev: true + /html-encoding-sniffer@4.0.0: resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} engines: {node: '>=18'} @@ -5328,8 +5370,8 @@ packages: hasBin: true dev: true - /typescript@5.6.0-dev.20240604: - resolution: {integrity: sha512-uwpkMy5U51ERVvVtQmDZwjYllREGrqP35JcdR5yWIoZ7ZE2I1oDsDs3mtLiiiccyHspCZ54Z741ibuP3NbACtg==} + /typescript@5.6.0-dev.20240620: + resolution: {integrity: sha512-9ZJectAScwy9A0iOaJO+7WZo73nci6vjsLpHWxDomvxPT5N6Uq3gvSn+MIGdRPX818oBkpq7xZ8MFcVXdAUQGw==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -5668,3 +5710,16 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} dev: true + + /zod-validation-error@3.3.0(zod@3.23.8): + resolution: {integrity: sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.18.0 + dependencies: + zod: 3.23.8 + dev: true + + /zod@3.23.8: + resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} + dev: true