Skip to content

Commit

Permalink
Update src/content/blog/2023-09-26-preparing-custom-rules-eslint-v9.md
Browse files Browse the repository at this point in the history
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
  • Loading branch information
nzakas and amareshsm committed Sep 26, 2023
1 parent f8c5861 commit e147c69
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -76,7 +76,7 @@ module.exports = {

### `context.getAncestors()`

The `context.getAncestors()` method is another method on `context` that used the internal traversal state to return the ancestors of the currently visited node. And also similar to `context.getScope()`, this meant the method was both limited and unclear. We are deprecating this method and will remove it in v9.0.0. The replacement method is `SourceCode#getAncestors(node)` (added in v8.38.0), which requires you to pass in the node whose ancestors you want to retrieve. Here is an example that checks for the correct method to use:
The `context.getAncestors()` method is another method on `context` that uses the internal traversal state to return the ancestors of the currently visited node. Also similar to `context.getScope()`, this meant the method was both limited and unclear. We are deprecating this method and will remove it in v9.0.0. The replacement method is `SourceCode#getAncestors(node)` (added in v8.38.0), which requires you to pass in the node whose ancestors you want to retrieve. Here is an example that checks for the correct method to use:

```js
module.exports = {
Expand Down

0 comments on commit e147c69

Please sign in to comment.