Add XO to your project
$ npm init xo [options]
Example:
$ npm init xo --space --no-semicolon
const createXo = require('create-xo');
(async () => {
await createXo();
})();
Returns a Promise
.
Type: object
Type: string
Default: process.cwd()
Current working directory.
Type: string[]
Default: CLI arguments (process.argv.slice(2)
)
Options to put in XO's config in package.json
.
For instance, with the arguments ['--space', '--env=node']
the following will be put in package.json
:
{
"name": "awesome-package",
"xo": {
"space": true,
"envs": [
"node"
]
}
}