Socket
Socket
Sign inDemoInstall

xo-init

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xo-init

Add XO to your project


Version published
Weekly downloads
4.7K
increased by47.73%
Maintainers
2
Weekly downloads
 
Created
Source

xo-init Build Status

Add XO to your project

Install

$ npm install xo-init

Usage

const xoInit = require('xo-init');

xoInit().then(() => {
	console.log('done');
});

API

xoInit([options])

Returns a Promise.

options
cwd

Type: string
Default: process.cwd()

Current working directory.

args

Type: Array
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"]
	}
}

CLI

Install XO globally $ npm install --global xo and run $ xo --init [<options>].

License

MIT © Sindre Sorhus

Keywords

FAQs

Package last updated on 13 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc