Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "major",
"comment": "feat: enable react-hooks/react-compiler ESLint rule",
"packageName": "@rightcapital/eslint-config",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-lodash": "8.0.0",
"eslint-plugin-n": "17.18.0",
"eslint-plugin-react-hooks": "5.2.0",
"eslint-plugin-react-hooks": "6.0.0-rc.1",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-unicorn": "56.0.1",
"eslint-plugin-unused-imports": "4.1.4",
Expand Down
4 changes: 4 additions & 0 deletions packages/eslint-config/src/config/mixin/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const config: TSESLint.FlatConfig.ConfigArray = [
// https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
'react-hooks/exhaustive-deps': 'error',

// React compiler related rules
// https://github.com/facebook/react/blob/2bcf06b69254cad6f7e702bf7d65c4f30478668c/packages/eslint-plugin-react-hooks/src/rules/ReactCompiler.ts
'react-hooks/react-compiler': 'error',

// MEMO: There are too many false positives with this rule.
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',

Expand Down
Loading