@@ -6,8 +6,9 @@ import reactHooksPlugin from "eslint-plugin-react-hooks";
66import jestPlugin from "eslint-plugin-jest" ;
77import packageJson from "eslint-plugin-package-json" ;
88import packageJsonFieldsOrder from "@mendix/prettier-config-web-widgets/package-json-fields-order.js" ;
9+ import { defineConfig } from "eslint/config" ;
910
10- export default tseslint . config (
11+ export default defineConfig (
1112 {
1213 name : "generic eslint" ,
1314 extends : [ eslint . configs . recommended ] ,
@@ -111,11 +112,16 @@ export default tseslint.config(
111112 } ,
112113 {
113114 name : "react hooks" ,
114- extends : [ reactHooksPlugin . configs [ "recommended-latest " ] ] ,
115+ extends : [ reactHooksPlugin . configs . flat [ "recommended" ] ] ,
115116 files : [ "**/*.ts" , "**/*.tsx" , "**/*.js" , "**/*.jsx" ] ,
116117 rules : {
117118 "react-hooks/rules-of-hooks" : "error" ,
118- "react-hooks/exhaustive-deps" : "warn"
119+ "react-hooks/exhaustive-deps" : "warn" ,
120+ "react-hooks/refs" : "off" ,
121+ "react-hooks/immutability" : "off" ,
122+ "react-hooks/preserve-manual-memoization" : "off" ,
123+ "react-hooks/set-state-in-effect" : "warn" ,
124+ "react-hooks/use-memo" : "warn"
119125 }
120126 } ,
121127 {
@@ -222,6 +228,11 @@ export default tseslint.config(
222228 "package-json/no-empty-fields" : "off" ,
223229 "package-json/require-type" : "off" ,
224230 "package-json/valid-exports" : "off" ,
231+ "package-json/require-exports" : "off" ,
232+ "package-json/require-files" : "off" ,
233+ "package-json/require-sideEffects" : "off" ,
234+ "package-json/require-attribution" : "off" ,
235+ "package-json/specify-peers-locally" : "off" ,
225236 "package-json/order-properties" : [
226237 "error" ,
227238 {
0 commit comments