| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 1 | import js from "@eslint/js"; |
| 2 | import globals from "globals"; |
| 3 | import reactHooks from "eslint-plugin-react-hooks"; |
| 4 | import reactRefresh from "eslint-plugin-react-refresh"; |
| 5 | import tseslint from "typescript-eslint"; |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 6 | |
| 7 | export default tseslint.config( |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 8 | { ignores: ["dist"] }, |
| 9 | { |
| 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], |
| 11 | files: ["**/*.{ts,tsx}"], |
| gio | 8d0f635 | 2025-05-11 13:29:33 +0000 | [diff] [blame] | 12 | ignores: [ |
| 13 | "src/components/ui/*.{ts,tsx}", |
| 14 | "src/hooks/*.{ts,tsx}", |
| 15 | ], |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 16 | 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, |
| gio | 4037078 | 2025-05-19 11:04:52 +0000 | [diff] [blame] | 26 | "react-hooks/exhaustive-deps": "error", |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 27 | "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 | ); |