Skip to content

Commit ce3c70f

Browse files
author
Dimitri POSTOLOV
authored
fix typos in custom-rules.md (#707)
1 parent 5bdc4ae commit ce3c70f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/custom-rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const rule: GraphQLESLintRule = {
3838
So what happens here?
3939

4040
1. `@graphql-eslint/eslint-plugin` handles the parsing process for your GraphQL content. It will load the GraphQL files (either from code files or from `.graphql` files with SDL), parse it using GraphQL parser, converts it to ESTree structure and let ESLint do the rest.
41-
1. You rule is being loaded by ESLint, and executes just like any other ESLint rule.
41+
1. Your rule is being loaded by ESLint, and executes just like any other ESLint rule.
4242
1. Our custom rule asks ESLint to run our function for every `OperationDefinition` found.
4343
1. If the `OperationDefinition` node doesn't have a valid `name` - we report an error to ESLint.
4444

@@ -49,7 +49,7 @@ You can scan the `packages/plugin/src/rules` directory in this repo for referenc
4949
## Accessing original GraphQL AST nodes
5050

5151
Since our parser converts GraphQL AST to ESTree structure, there are some minor differences in the structure of the objects.
52-
If you are using TypeScript, and you typed your rule with `GraphQLESLintRule` - you'll see that each `node` is a bit different from from the AST nodes of GraphQL (you can read more about that in [graphql-eslint parser documentation](./parser.md)).
52+
If you are using TypeScript, and you typed your rule with `GraphQLESLintRule` - you'll see that each `node` is a bit different from the AST nodes of GraphQL (you can read more about that in [graphql-eslint parser documentation](./parser.md)).
5353

5454
If you need access to the original GraphQL AST `node`, you can use `.rawNode()` method on each node you get from the AST structure of ESLint.
5555

0 commit comments

Comments
 (0)