| 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}"], |
| 12 | languageOptions: { |
| 13 | ecmaVersion: 2020, |
| 14 | globals: globals.browser, |
| 15 | }, |
| 16 | plugins: { |
| 17 | "react-hooks": reactHooks, |
| 18 | "react-refresh": reactRefresh, |
| 19 | }, |
| 20 | rules: { |
| 21 | ...reactHooks.configs.recommended.rules, |
| 22 | "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], |
| 23 | "@typescript-eslint/no-unused-vars": [ |
| 24 | "error", |
| 25 | { |
| 26 | argsIgnorePattern: "^_$", |
| 27 | varsIgnorePattern: "^_$", |
| 28 | caughtErrorsIgnorePattern: "^_$", |
| 29 | }, |
| 30 | ], |
| 31 | }, |
| 32 | }, |
| 33 | ); |