Skip to content

Commit

Permalink
feat: add eslint-plugin-react-compiler (#6920)
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud authored Sep 2, 2024
1 parent a67792e commit 7c142a0
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["import", "unicorn"],
"plugins": ["import", "unicorn", "eslint-plugin-react-compiler"],
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
Expand Down Expand Up @@ -81,6 +81,7 @@
"curly": "error", // Enforce consistent brace style
"eqeqeq": "error", // Only type-safe equality operators
"unicorn/expiring-todo-comments": ["error"],
"no-console": "error"
"no-console": "error",
"react-compiler/react-compiler": 2
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"eslint-plugin-jest": "^28.2.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-compiler": "0.0.0-experimental-17e519c-20240806",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unicorn": "^55.0.0",
"husky": "^9.1.5",
Expand Down
65 changes: 63 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-create-class-features-plugin@npm:^7.24.7":
"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.24.7":
version: 7.24.7
resolution: "@babel/helper-create-class-features-plugin@npm:7.24.7"
dependencies:
Expand Down Expand Up @@ -362,7 +362,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3":
"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3":
version: 7.25.3
resolution: "@babel/parser@npm:7.25.3"
dependencies:
Expand Down Expand Up @@ -421,6 +421,18 @@ __metadata:
languageName: node
linkType: hard

"@babel/plugin-proposal-private-methods@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6"
dependencies:
"@babel/helper-create-class-features-plugin": "npm:^7.18.6"
"@babel/helper-plugin-utils": "npm:^7.18.6"
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 10/22d8502ee96bca99ad2c8393e8493e2b8d4507576dd054490fd8201a36824373440106f5b098b6d821b026c7e72b0424ff4aeca69ed5f42e48f029d3a156d5ad
languageName: node
linkType: hard

"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2":
version: 7.21.0-placeholder-for-preset-env.2
resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2"
Expand Down Expand Up @@ -4619,6 +4631,7 @@ __metadata:
eslint-plugin-jest: "npm:^28.2.0"
eslint-plugin-prettier: "npm:^5.2.1"
eslint-plugin-react: "npm:^7.33.2"
eslint-plugin-react-compiler: "npm:0.0.0-experimental-17e519c-20240806"
eslint-plugin-react-hooks: "npm:^4.6.2"
eslint-plugin-unicorn: "npm:^55.0.0"
husky: "npm:^9.1.5"
Expand Down Expand Up @@ -8138,6 +8151,22 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-react-compiler@npm:0.0.0-experimental-17e519c-20240806":
version: 0.0.0-experimental-17e519c-20240806
resolution: "eslint-plugin-react-compiler@npm:0.0.0-experimental-17e519c-20240806"
dependencies:
"@babel/core": "npm:^7.24.4"
"@babel/parser": "npm:^7.24.4"
"@babel/plugin-proposal-private-methods": "npm:^7.18.6"
hermes-parser: "npm:^0.20.1"
zod: "npm:^3.22.4"
zod-validation-error: "npm:^3.0.3"
peerDependencies:
eslint: ">=7"
checksum: 10/2a74d9af6fdf3c0be7768f6fb8533b093d69b3df0fc0bd179f8a712f562d6ec9d41585c8611e1e51e3f8881910adc0062121455bcb96f9a6dd45957938ffaabf
languageName: node
linkType: hard

"eslint-plugin-react-hooks@npm:^4.6.2":
version: 4.6.2
resolution: "eslint-plugin-react-hooks@npm:4.6.2"
Expand Down Expand Up @@ -9590,6 +9619,22 @@ __metadata:
languageName: node
linkType: hard

"hermes-estree@npm:0.20.1":
version: 0.20.1
resolution: "hermes-estree@npm:0.20.1"
checksum: 10/b98fc2943bd9fdd904c094e995f79cb7d5958393e221006af81d88f3aed52ddbf15138a6606766d5e6be7ba166576be65f577d0c72ae5eb0f3f56d4720b32baa
languageName: node
linkType: hard

"hermes-parser@npm:^0.20.1":
version: 0.20.1
resolution: "hermes-parser@npm:0.20.1"
dependencies:
hermes-estree: "npm:0.20.1"
checksum: 10/b1ae9e9f6b49234fcf2bd45eafde140a3c727b8bcb845ab398016a538f040d326291d1f8b75fd91793b8817f2c600a890e251984d55bdedea74a5143d29f0c81
languageName: node
linkType: hard

"hosted-git-info@npm:^2.1.4":
version: 2.8.9
resolution: "hosted-git-info@npm:2.8.9"
Expand Down Expand Up @@ -18057,6 +18102,22 @@ __metadata:
languageName: node
linkType: hard

"zod-validation-error@npm:^3.0.3":
version: 3.3.0
resolution: "zod-validation-error@npm:3.3.0"
peerDependencies:
zod: ^3.18.0
checksum: 10/19574cbc453c7a41105de572546e95191958f459dd93440f541a42c0ff209b56f1cd54e8f8ab1899430dd7c183e11cd16e8cace0bd4fc5d356ef772645210792
languageName: node
linkType: hard

"zod@npm:^3.22.4":
version: 3.23.8
resolution: "zod@npm:3.23.8"
checksum: 10/846fd73e1af0def79c19d510ea9e4a795544a67d5b34b7e1c4d0425bf6bfd1c719446d94cdfa1721c1987d891321d61f779e8236fde517dc0e524aa851a6eff1
languageName: node
linkType: hard

"zwitch@npm:^1.0.0":
version: 1.0.5
resolution: "zwitch@npm:1.0.5"
Expand Down

0 comments on commit 7c142a0

Please sign in to comment.