Skip to content

Commit

Permalink
Docs: Describe range in rule docs (fixes #14162) (#15174)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Oct 17, 2021
1 parent b5049c8 commit 35f3254
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/developer-guide/working-with-rules.md
Expand Up @@ -321,6 +321,8 @@ The `fixer` object has the following methods:
* `replaceText(nodeOrToken, text)` - replaces the text in the given node or token
* `replaceTextRange(range, text)` - replaces the text in the given range

A range is a two-item array containing character indices inside of the source code. The first item is the start of the range (inclusive) and the second item is the end of the range (exclusive). Every node and token has a `range` property to identify the source code range they represent.

The above methods return a `fixing` object.
The `fix()` function can return the following values:

Expand Down

0 comments on commit 35f3254

Please sign in to comment.