blob: 53e1e9b2cb9f02a413d81c7d505761ca7c3c6d21 [file] [log] [blame]
giod0026612025-05-08 13:00:36 +00001import js from "@eslint/js";
2import globals from "globals";
3import reactHooks from "eslint-plugin-react-hooks";
4import reactRefresh from "eslint-plugin-react-refresh";
5import tseslint from "typescript-eslint";
gio5f2f1002025-03-20 18:38:48 +04006
7export default tseslint.config(
giod0026612025-05-08 13:00:36 +00008 { ignores: ["dist"] },
9 {
10 extends: [js.configs.recommended, ...tseslint.configs.recommended],
11 files: ["**/*.{ts,tsx}"],
gio8d0f6352025-05-11 13:29:33 +000012 ignores: [
13 "src/components/ui/*.{ts,tsx}",
14 "src/hooks/*.{ts,tsx}",
15 ],
giod0026612025-05-08 13:00:36 +000016 languageOptions: {
17 ecmaVersion: 2020,
18 globals: globals.browser,
19 },
20 plugins: {
21 "react-hooks": reactHooks,
22 "react-refresh": reactRefresh,
23 },
24 rules: {
25 ...reactHooks.configs.recommended.rules,
gio40370782025-05-19 11:04:52 +000026 "react-hooks/exhaustive-deps": "error",
giod0026612025-05-08 13:00:36 +000027 "react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
28 "@typescript-eslint/no-unused-vars": [
29 "error",
30 {
31 argsIgnorePattern: "^_$",
32 varsIgnorePattern: "^_$",
33 caughtErrorsIgnorePattern: "^_$",
34 },
35 ],
36 },
37 },
38);