import js from "@eslint/js"; import reactPlugin from "eslint-plugin-react"; import reactHooks from "eslint-plugin-react-hooks"; import jsxA11y from "eslint-plugin-jsx-a11y"; import importPlugin from "eslint-plugin-import"; export default [ js.configs.recommended, { files: ["**/*.{js,jsx,ts,tsx}"], ignores: [ "node_modules/**", ".next/**", "out/**", "dist/**" ], languageOptions: { ecmaVersion: "latest", sourceType: "module", globals: { React: true, JSX: true } }, plugins: { react: reactPlugin, "react-hooks": reactHooks, "jsx-a11y": jsxA11y, import: importPlugin }, settings: { react: { version: "detect" }, "import/resolver": { node: { extensions: [".js", ".jsx", ".ts", ".tsx"] }, typescript: {} } }, rules: { /* React */ "react/react-in-jsx-scope": "off", "react/jsx-uses-react": "off", "react/jsx-uses-vars": "warn", /* Hooks */ "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", /* Importação e organização */ "import/order": [ "error", { groups: [ ["builtin", "external"], ["internal"], ["parent", "sibling", "index"] ], pathGroups: [ { pattern: "@/**", group: "internal", position: "after" } ], alphabetize: { order: "asc", caseInsensitive: true }, "newlines-between": "always" } ], "import/no-duplicates": "error", "import/newline-after-import": ["error", { count: 1 }], "no-unused-vars": "warn" } } ];