Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
filename: file.path,
fix: options.fix
});
} catch (error) {
this.emit('error', new PluginError('gulp-xo', error, {fileName: file.path}));
}
let result = report.results;
if (result.length === 0) {
callback(null, file);
return;
}
if (options.quiet) {
result = xo.getErrorResults(result);
}
file.eslint = result[0];
if (file.eslint.output) {
file.contents = Buffer.from(file.eslint.output);
file.eslint.fixed = true;
}
callback(null, file);
});
};