import { defineConfig } from "eslint/config";
import globals from "globals";
// Currently we are using this section for excluding certain files from certain rules.
export default defineConfig([
  {
    files: [
      "**/.prettierrc.js",
      "app/assets/**/*",
      "app/javascript/packs/**/*",
      "**/*.json",
    ],

    rules: {
      "import/order": "off",
      "react-hooks/rules-of-hooks": "off",
    },
  },
  {
    files: ["app/javascript/packs/**/*.{js,jsx}"],

    rules: { "no-redeclare": "off" },
  },
  {
    files: ["**/*.spec.js", "**/*.spec.jsx", "**/*.test.jsx"],

    languageOptions: { globals: { ...globals.jest } },
  },
]);
