Skip to content
Permalink
Browse files
Docs: Describe range in rule docs (fixes #14162) (#15174)
  • Loading branch information
nzakas committed Oct 17, 2021
1 parent b5049c8 commit 35f3254d5f8027f75a6cb35b58bea10037003be8
Showing with 2 additions and 0 deletions.
  1. +2 −0 docs/developer-guide/working-with-rules.md
@@ -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:

0 comments on commit 35f3254

Please sign in to comment.