// ESLint flat config for Puppeteer test files
export default [
    {
        files: ["test_*.js", "helpers.js"],
        languageOptions: {
            ecmaVersion: 2022,
            sourceType: "commonjs",
            globals: {
                // Node.js globals
                require: "readonly",
                module: "readonly",
                __dirname: "readonly",
                process: "readonly",
                console: "readonly",
                // Mocha globals
                describe: "readonly",
                it: "readonly",
                before: "readonly",
                after: "readonly",
                beforeEach: "readonly",
                afterEach: "readonly",
            }
        },
        rules: {
            // Disable no-unused-vars for test files - common with destructured imports
            "no-unused-vars": "off",
            // Disable undef since we define globals above
            "no-undef": "off"
        }
    }
];
