Skip to content

Full Toolkit for Next-Level Domain Analysis

Configure React Compiler ESLint plugin 🔦

Felix Wotschofsky4094fb866aa2
diff --git a/.eslintrc.json b/.eslintrc.json
index 7aa27a8..22f8b16 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,7 +1,8 @@
{
"extends": "next/core-web-vitals",
- "plugins": ["@typescript-eslint"],
+ "plugins": ["@typescript-eslint", "eslint-plugin-react-compiler"],
"rules": {
- "@typescript-eslint/consistent-type-imports": "error"
+ "@typescript-eslint/consistent-type-imports": "error",
+ "react-compiler/react-compiler": "error"
}
}
diff --git a/app/_components/search-form.tsx b/app/_components/search-form.tsx
index c6df601..38c9c51 100644
--- a/app/_components/search-form.tsx
+++ b/app/_components/search-form.tsx
@@ -140,7 +140,7 @@ export const SearchForm: FC<SearchFormProps> = (props) => {
inputRef.current?.focus();
},
{ preventDefault: true },
- [inputRef.current],
+ [inputRef],
);
const redirectUser = useCallback(
diff --git a/package.json b/package.json
index b6dc9bc..0de2b56 100644
--- a/package.json
+++ b/package.json
@@ -80,6 +80,7 @@
"@typescript-eslint/eslint-plugin": "^8.2.0",
"eslint": "^8.57.0",
"eslint-config-next": "15.0.1",
+ "eslint-plugin-react-compiler": "19.0.0-beta-6fc168f-20241025",
"happy-dom": "^15.0.0",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6f1d10d..8076ad1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -202,6 +202,9 @@ importers:
eslint-config-next:
specifier: 15.0.1
+ eslint-plugin-react-compiler:
+ specifier: 19.0.0-beta-6fc168f-20241025
+ version: 19.0.0-beta-6fc168f-20241025([email protected])
happy-dom:
specifier: ^15.0.0
version: 15.0.0
@@ -394,6 +397,13 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0
+ '@babel/[email protected]':
+ 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
+
'@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2':
resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==}
engines: {node: '>=6.9.0'}
@@ -2630,6 +2640,12 @@ packages:
peerDependencies:
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9
+ resolution: {integrity: sha512-mHn5tYt9dT4GiXHF5muiz6p+4Lirgi0Oc87N2KrbB/ciSkT+VZ8iJA+6bbS4//ljYzYbxBbPMHWS/dZWhQrbpQ==}
+ engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0}
+ peerDependencies:
+ eslint: '>=7'
+
resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==}
engines: {node: '>=10'}
@@ -2864,6 +2880,12 @@ packages:
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg==}
+
+ resolution: {integrity: sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA==}
+
resolution: {integrity: sha512-xnFt2ZkbFcjc+JoAtg3Hl89VeEZDjododu4VCPkRvFmBTHHA9U1Nt6hLUWfW2O+6Sl/rT1hHK/PivleX3PdBJQ==}
engines: {node: '>=4.2'}
@@ -4206,6 +4228,12 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==}
+ engines: {node: '>=18.0.0'}
+ peerDependencies:
+ zod: ^3.18.0
+
resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
@@ -4452,6 +4480,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@babel/core': 7.25.2
+ '@babel/helper-create-class-features-plugin': 7.25.4(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.24.8
+ transitivePeerDependencies:
+ - supports-color
+
'@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/[email protected])':
dependencies:
'@babel/core': 7.25.2
@@ -6855,6 +6891,18 @@ snapshots:
safe-regex-test: 1.0.3
string.prototype.includes: 2.0.1
+ dependencies:
+ '@babel/core': 7.25.2
+ '@babel/parser': 7.25.4
+ '@babel/plugin-proposal-private-methods': 7.18.6(@babel/[email protected])
+ eslint: 8.57.0
+ hermes-parser: 0.20.1
+ zod: 3.23.8
+ zod-validation-error: 3.4.0([email protected])
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
eslint: 8.57.0
@@ -7164,6 +7212,12 @@ snapshots:
dependencies:
function-bind: 1.1.2
+
+ dependencies:
+ hermes-estree: 0.20.1
+
dependencies:
class-list: 0.1.1
@@ -8502,4 +8556,8 @@ snapshots:
+ dependencies:
+ zod: 3.23.8
+