|
| 1 | +import js from "@eslint/js"; |
| 2 | +import reactDom from "eslint-plugin-react-dom"; |
| 3 | +import reactHooks from "eslint-plugin-react-hooks"; |
| 4 | +import reactRefresh from "eslint-plugin-react-refresh"; |
| 5 | +import reactX from "eslint-plugin-react-x"; |
| 6 | +import { globalIgnores } from "eslint/config"; |
| 7 | +import globals from "globals"; |
| 8 | +import tseslint from "typescript-eslint"; |
| 9 | + |
| 10 | +export default tseslint.config([ |
| 11 | + globalIgnores(["dist"]), |
| 12 | + { |
| 13 | + files: ["**/*.{ts,tsx}"], |
| 14 | + extends: [ |
| 15 | + js.configs.recommended, |
| 16 | + ...tseslint.configs.recommendedTypeChecked, |
| 17 | + ...tseslint.configs.stylisticTypeChecked, |
| 18 | + reactHooks.configs["recommended-latest"], |
| 19 | + reactRefresh.configs.vite, |
| 20 | + reactX.configs["recommended-typescript"], |
| 21 | + reactDom.configs.recommended, |
| 22 | + ], |
| 23 | + languageOptions: { |
| 24 | + parserOptions: { |
| 25 | + project: ["./tsconfig.node.json", "./tsconfig.app.json"], |
| 26 | + tsconfigRootDir: import.meta.dirname, |
| 27 | + }, |
| 28 | + ecmaVersion: 2020, |
| 29 | + globals: globals.browser, |
| 30 | + }, |
| 31 | + }, |
| 32 | +]); |
0 commit comments