Skip to content

Commit 52bb8c3

Browse files
committed
prettier
1 parent e2aab21 commit 52bb8c3

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

packages/plugin/src/rules/graphql-js-validation.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ import { GraphQLESLintRule, GraphQLESLintRuleContext, RuleDocsInfo } from '../ty
5151
import {
5252
ARRAY_DEFAULT_OPTIONS,
5353
REPORT_ON_FIRST_CHARACTER,
54-
requireGraphQLSchema,
5554
requireGraphQLOperations,
55+
requireGraphQLSchema,
5656
} from '../utils.js';
5757

5858
type GraphQLJSRule = ValidationRule | SDLValidationRule;
@@ -218,9 +218,7 @@ const validationToRule = (
218218
create(context) {
219219
return {
220220
Document(node) {
221-
const schema = docs.requiresSchema
222-
? requireGraphQLSchema(ruleId, context)
223-
: null;
221+
const schema = docs.requiresSchema ? requireGraphQLSchema(ruleId, context) : null;
224222

225223
const documentNode = getDocumentNode
226224
? getDocumentNode({ ruleId, context, node: node.rawNode() })

packages/plugin/src/rules/no-unused-fields/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FromSchema } from 'json-schema-to-ts';
44
import { ModuleCache } from '../../cache.js';
55
import { SiblingOperations } from '../../siblings.js';
66
import { GraphQLESLintRule, GraphQLESTreeNode } from '../../types.js';
7-
import { requireGraphQLSchema, requireGraphQLOperations } from '../../utils.js';
7+
import { requireGraphQLOperations, requireGraphQLSchema } from '../../utils.js';
88

99
const RULE_ID = 'no-unused-fields';
1010

packages/plugin/src/rules/require-description/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { ASTKindToNode, Kind, TokenKind } from 'graphql';
22
import { getRootTypeNames } from '@graphql-tools/utils';
33
import { GraphQLESTreeNode } from '../../estree-converter/index.js';
44
import { GraphQLESLintRule, ValueOf } from '../../types.js';
5-
import {
6-
getLocation,
7-
getNodeName,
8-
requireGraphQLSchema,
9-
TYPES_KINDS,
10-
} from '../../utils.js';
5+
import { getLocation, getNodeName, requireGraphQLSchema, TYPES_KINDS } from '../../utils.js';
116

127
export const RULE_ID = 'require-description';
138

packages/plugin/src/rules/require-selections/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { GraphQLESLintRule, OmitRecursively, ReportDescriptor } from '../../type
1818
import {
1919
ARRAY_DEFAULT_OPTIONS,
2020
englishJoinWords,
21-
requireGraphQLSchema,
2221
requireGraphQLOperations,
22+
requireGraphQLSchema,
2323
} from '../../utils.js';
2424

2525
const RULE_ID = 'require-selections';

website/content/docs/custom-rules.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ become available in your rules in two ways:
115115
#### Getting `GraphQLSchema`
116116

117117
To mark your ESLint rules as a rule that needs access to GraphQL schema, start by running
118-
`requireGraphQLSchema` from the plugin package, it will make sure to return a schema, or
119-
throw an error for the user about the missing schema.
118+
`requireGraphQLSchema` from the plugin package, it will make sure to return a schema, or throw an
119+
error for the user about the missing schema.
120120

121121
```ts
122122
const schema = requireGraphQLSchema(ruleName, context)

0 commit comments

Comments
 (0)