import base from "./base.js";

/**
 * Shared Oxlint config for erp-kit application backends.
 * Consumers: `import erpKit from "@tailor-platform/erp-kit/oxlint/backend"`.
 */
export default {
  extends: [base],
  overrides: [
    {
      files: ["src/executor/**/*.ts", "src/resolver/**/*.ts"],
      rules: {
        "no-restricted-imports": [
          "error",
          {
            patterns: [
              {
                regex: "^node:",
                message: "Node.js built-in modules are not allowed in executor/resolver.",
              },
            ],
          },
        ],
      },
    },
    {
      files: ["src/**/*.ts"],
      rules: {
        "no-console": ["error", { allow: [] }],
      },
    },
    {
      files: ["**/*.test.ts", "**/test-utils/**/*.ts", "**/tests/**/*.ts"],
      rules: {
        "no-console": "off",
      },
    },
  ],
};
