Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tough-apes-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-eslint/eslint-plugin': patch
---

make `RuleDocsInfo` type optional
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
releaseScript: release
nodeVersion: 18
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
script: yarn ci:lint
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

typecheck:
name: typecheck / graphql v${{matrix.graphql_version}}
Expand Down
7 changes: 2 additions & 5 deletions packages/plugin/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ export type GraphQLESLintRuleContext<Options = any[]> = Omit<

export type CategoryType = 'Schema' | 'Operations';

export type RuleDocsInfo<T> = {
description: string;
export type RuleDocsInfo<T> = Omit<Rule.RuleMetaData['docs'], 'category' | 'suggestion'> & {
category: CategoryType | CategoryType[];
recommended?: boolean;
url: string;
requiresSchema?: true;
requiresSiblings?: true;
examples?: {
Expand All @@ -77,7 +74,7 @@ export type RuleDocsInfo<T> = {
export type GraphQLESLintRule<Options = any[], WithTypeInfo extends boolean = false> = {
create(context: GraphQLESLintRuleContext<Options>): GraphQLESLintRuleListener<WithTypeInfo>;
meta: Omit<Rule.RuleMetaData, 'docs'> & {
docs: RuleDocsInfo<Options>;
docs?: RuleDocsInfo<Options>;
};
};

Expand Down