Cypress plugins use CommonJS syntax with module.exports to export the function.
Step 2: Analyze options for correct syntax
module.exports = (on, config) => { on('task', { myTask() { return null } }) } uses module.exports with arrow function and correct event handler setup. The other options fail: one defines a local const without export, another uses ES module export, and the last lacks any export.