Skip to content

Commit

Permalink
Docs: explain config option merging (#7499)
Browse files Browse the repository at this point in the history
* Update docs to explain config option merging

There was a lot of [confusion](#6361) generated by the merging behavior of rules inherited from base configs, so I thought I would clear that up here. There still may be [scenarios](#6144) which arise where options cannot be overridden from base configs, but we'll deal with those on a per-case basis.

* Use 4 spaces, not 2

* Use string notation, instead of numeric

* Fix level
  • Loading branch information
danny-andrews authored and nzakas committed Nov 8, 2016
1 parent 1766524 commit 3e6131e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/user-guide/configuring.md
Expand Up @@ -566,8 +566,14 @@ ESLint extends configurations recursively so a base configuration can also have
The `rules` property can do any of the following to extend (or override) the set of rules:

* enable additional rules
* override default options for rules from base configurations
* disable rules from base configurations
* change an inherited rule's severity without changing its options:
* Base config: `"eqeqeq": ["error", "allow-null"]`
* Derived config: `"eqeqeq": "warning"`
* Resulting actual config: `"eqeqeq": ["warning", "allow-null"]`
* override options for rules from base configurations:
* Base config: `"quotes": ["error", "single", "avoid-escape"]`
* Derived config: `"quotes": ["error", "single"]`
* Resulting actual config: `"quotes": ["error", "single"]`

### Using `"eslint:recommended"`

Expand Down

0 comments on commit 3e6131e

Please sign in to comment.