2024-06-08 20:49:57 +02:00
|
|
|
import reactPlugin from "eslint-plugin-react";
|
|
|
|
|
import hooksPlugin from "eslint-plugin-react-hooks";
|
|
|
|
|
|
|
|
|
|
/** @type {Awaited<import('typescript-eslint').Config>} */
|
|
|
|
|
export default [
|
|
|
|
|
{
|
|
|
|
|
files: ["**/*.ts", "**/*.tsx"],
|
|
|
|
|
plugins: {
|
|
|
|
|
react: reactPlugin,
|
|
|
|
|
"react-hooks": hooksPlugin,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
...reactPlugin.configs["jsx-runtime"].rules,
|
|
|
|
|
...hooksPlugin.configs.recommended.rules,
|
|
|
|
|
// context.getSource is not a function
|
|
|
|
|
"react-hooks/exhaustive-deps": "off",
|
|
|
|
|
},
|
|
|
|
|
languageOptions: {
|
|
|
|
|
globals: {
|
|
|
|
|
React: "writable",
|
|
|
|
|
},
|
2023-12-08 22:35:15 +01:00
|
|
|
},
|
|
|
|
|
},
|
2024-06-08 20:49:57 +02:00
|
|
|
];
|