$ npm i xo-webpack-plugin --save-dev
In your webpack configuration
const XoPlugin = require('xo-webpack-plugin');
// ...
const plugins = [
// ...
]
const options = {
// ...
}
module.exports = (env, argv) => {
// Example condition to only run on watch
if (argv.watch === true) {
options.plugins.push(new XoPlugin({
// XO Options: https://github.com/sindresorhus/xo#config)
}));
}
return options
}
That's it!