Skip to content

Commit

Permalink
Add rule config override example (#659)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
mmkal and sindresorhus committed Apr 8, 2022
1 parent 072c6d8 commit 352f20c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions readme.md
Expand Up @@ -205,6 +205,22 @@ Type: `object`

Override any of the [default rules](https://github.com/xojs/eslint-config-xo/blob/main/index.js). See the [ESLint docs](https://eslint.org/docs/rules/) for more info on each rule.

Disable a rule in your XO config to turn it off globally in your project.

Example using `package.json`:

```json
{
"xo": {
"rules": {
"unicorn/no-array-for-each": "off"
}
}
}
```

You could also use `.xo-config.json` or one of the other config file formats supported by XO.

Please take a moment to consider if you really need to use this option.

### semicolon
Expand Down

0 comments on commit 352f20c

Please sign in to comment.