module.exports = {
  overrides: [
    {
      files: ["**/*.stories.*"],
      rules: {
        "no-alert": "error",
        "no-console": "error",
        "no-restricted-properties": [
          "error",
          {
            object: "window",
            property: "alert",
            message: "Use Storybook actions instead of alerts in stories.",
          },
          {
            object: "console",
            property: "log",
            message:
              "Use Storybook actions instead of console logging in stories.",
          },
          {
            object: "console",
            property: "warn",
            message:
              "Use Storybook actions instead of console logging in stories.",
          },
          {
            object: "console",
            property: "error",
            message:
              "Use Storybook actions instead of console logging in stories.",
          },
        ],
      },
    },
    {
      files: ["*.ts", "*.tsx"],
      parserOptions: {
        project: "tsconfig.eslint.json",
        tsconfigRootDir: __dirname,
        sourceType: "module",
      },
      rules: {
        "@typescript-eslint/consistent-type-exports": "error",
        "@typescript-eslint/consistent-type-imports": "error",
      },
    },
  ],
  rules: {
    "import/no-internal-modules": [
      "error",
      {
        allow: ["**"],
      },
    ],
  },
};
