xo-webpack-plugin

A plugin for webpack to run XO

Usage no npm install needed!

<script type="module">
  import xoWebpackPlugin from 'https://cdn.skypack.dev/xo-webpack-plugin';
</script>

README

xo-webpack-plugin

XO plugin for webpack.

Install

$ npm i xo-webpack-plugin --save-dev

Usage

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!

License