Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Nov 17, 2024
1 parent a691206 commit d959c55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .changeset/lovely-emus-shake.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
'@graphql-eslint/eslint-plugin': major
---

Add new config option `ignoredFieldSelectors` to `no-unused-fields` rule to ignore all the relay pagination fields for every connection exposed in schema for example
Add new config option `ignoredFieldSelectors` to `no-unused-fields` rule to ignore all the relay
pagination fields for every connection exposed in schema for example
2 changes: 1 addition & 1 deletion packages/plugin/src/rules/no-unused-fields/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GraphQLProjectConfig } from 'graphql-config';
import { FromSchema } from 'json-schema-to-ts';
import { ModuleCache } from '../../cache.js';
import { SiblingOperations } from '../../siblings.js';
import { GraphQLESLintRule, GraphQLESLintRuleListener, GraphQLESTreeNode } from '../../types.js';
import { GraphQLESLintRule, GraphQLESTreeNode } from '../../types.js';
import { requireGraphQLSchemaFromContext, requireSiblingsOperations } from '../../utils.js';

const RULE_ID = 'no-unused-fields';
Expand Down
4 changes: 3 additions & 1 deletion scripts/generate-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ async function generateDocs(): Promise<void> {
const prettierConfigTs = await prettier.resolveConfig('./_meta.ts');

const result = Object.entries(rules).map(async ([ruleName, rule]) => {
const frontMatterDescription = rule.meta.docs!.description!.replace(/\n.*/g, '').replace(MARKDOWN_LINK_RE, '$1')
const frontMatterDescription = rule.meta
.docs!.description!.replace(/\n.*/g, '')
.replace(MARKDOWN_LINK_RE, '$1');
const blocks: string[] = [
'---',
`description: ${JSON.stringify(frontMatterDescription)}`,
Expand Down

0 comments on commit d959c55

Please sign in to comment.