From 352f20c0b0572c674f519cdf98a46fa0f35a96d9 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Date: Fri, 8 Apr 2022 04:00:06 -0400 Subject: [PATCH] Add rule config override example (#659) Co-authored-by: Sindre Sorhus --- readme.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/readme.md b/readme.md index 1533ac75..0980da30 100644 --- a/readme.md +++ b/readme.md @@ -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