import process from "node:process";
import antfu from "@antfu/eslint-config";

export default antfu({
  vue: true,
  typescript: true,
  jsonc: true,
  gitignore: true,
  ignores: [
    "ios",
    "android",
    "dist",
    "coverage",
    "node_modules",
  ],
  stylistic: {
    semi: true,
    quotes: "double",
  },
  formatters: {
    css: "prettier",
  },
  parserOptions: {
    ecmaVersion: 2020,
  },
  rules: {
    "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
    "no-unused-vars": "off",
    "unused-imports/no-unused-vars": "off",
    "unused-imports/no-unused-imports": "off",
    "vue/no-deprecated-slot-attribute": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "prefer-promise-reject-errors": "off",
  },
});
