Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule config override example #659

Merged
merged 3 commits into from Apr 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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