Skip to content

Commit

Permalink
Update docs/src/extend/custom-rules.md
Browse files Browse the repository at this point in the history
Co-authored-by: Nitin Kumar <snitin315@gmail.com>
  • Loading branch information
nzakas and snitin315 committed Apr 20, 2023
1 parent 03d8b7c commit 6a4fa11
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/src/extend/custom-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ Here, the `fix()` function is used to insert a semicolon after the node. Note th
The `fixer` object has the following methods:

* `insertTextAfter(nodeOrToken, text)`: Insert text after the given node or token.
* `insertTextAfterRange(range, text)`: Insert text after the given range
* `insertTextBefore(nodeOrToken, text)`: Insert text before the given node or token
* `insertTextBeforeRange(range, text)`: Insert text before the given range
* `remove(nodeOrToken)`: Remove the given node or token
* `removeRange(range)`: Remove text in the given range
* `replaceText(nodeOrToken, text)`: Replace the text in the given node or token
* `replaceTextRange(range, text)`: Replace the text in the given range
* `insertTextAfterRange(range, text)`: Insert text after the given range.
* `insertTextBefore(nodeOrToken, text)`: Insert text before the given node or token.
* `insertTextBeforeRange(range, text)`: Insert text before the given range.
* `remove(nodeOrToken)`: Remove the given node or token.
* `removeRange(range)`: Remove text in the given range.
* `replaceText(nodeOrToken, text)`: Replace the text in the given node or token.
* `replaceTextRange(range, text)`: Replace the text in the given range.

A `range` is a two-item array containing character indices inside 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.

Expand Down

0 comments on commit 6a4fa11

Please sign in to comment.