Skip to content

Latest commit

 

History

History
75 lines (58 loc) · 869 Bytes

xo.md

File metadata and controls

75 lines (58 loc) · 869 Bytes

Enforces the use of XO

Detects if XO is being used and is being used correctly.

Fail

{
  "name": "foo",
  "devDependencies": {
    "xo": "*"
  }
}

XO is not being used in the test script.

{
  "name": "foo",
  "scripts": {
    "test": "xo --esnext"
  },
  "devDependencies": {
    "xo": "*"
  }
}

Specify XO configuration via a config object instead of passing it through via the CLI.

Pass

{
  "name": "foo",
  "scripts": {
    "test": "xo"
  },
  "devDependencies": {
    "xo": "*"
  }
}
{
  "name": "foo",
  "engines": {
    "node": ">=4"
  },
  "scripts": {
    "test": "xo"
  },
  "devDependencies": {
    "xo": "*"
  },
  "xo": {
    "esnext": true
  }
}

Options

You can set the required version of XO.

"xo": ["error", "0.16.0"]