Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
https://github.com/graphql-hive/graphql-eslint/blob/master/examples/graphql-config/eslint.config.js shows type error on
|
plugins: { |
|
'@graphql-eslint': graphqlPlugin, |
|
}, |
if you enable typescript for this file, or rename it to .ts
Type '{ parser: { parseForESLint: (code: string, options: ParserOptions) => GraphQLESLintParseResult; meta: { name: string; version: string | undefined; }; }; processor: { ...; }; rules: { ...; }; configs: { ...; }; }' is not assignable to type 'Plugin'.
Types of property 'rules' are incompatible.
Type '{ alphabetize: GraphQLESLintRule<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined; values?: boolean | undefined; fields?: ("ObjectTypeDefinition" | ... 1 more ....' is not assignable to type 'Record<string, RuleDefinition<RuleDefinitionTypeOptions>>'.
Property 'alphabetize' is incompatible with index signature.
Type 'GraphQLESLintRule<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined; values?: boolean | undefined; fields?: ("ObjectTypeDefinition" | ... 1 more ... | "InputObje...' is not assignable to type 'RuleDefinition<RuleDefinitionTypeOptions>'.
Types of property 'meta' are incompatible.
Type 'Omit<RuleMetaData, "docs" | "schema"> & { docs?: RuleDocsInfo<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; ... 4 more ...; groups?: string[] | undefined; }[]> | undefined; schema: any; }' is not assignable to type 'RulesMeta<string, unknown> | undefined'.
Type 'Omit<RuleMetaData, "docs" | "schema"> & { docs?: RuleDocsInfo<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; ... 4 more ...; groups?: string[] | undefined; }[]> | undefined; schema: any; }' is not assignable to type 'RulesMeta<string, unknown>'.
Types of property 'docs' are incompatible.
Type 'RuleDocsInfo<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined; values?: boolean | undefined; fields?: ("ObjectTypeDefinition" | ... 1 more ... | "InputObjectTyp...' is not assignable to type 'RulesMetaDocs | undefined'.
Type 'RuleDocsInfo<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined; values?: boolean | undefined; fields?: ("ObjectTypeDefinition" | ... 1 more ... | "InputObjectTyp...' is not assignable to type 'RulesMetaDocs | undefined'.
Type 'RuleDocsInfo<{ definitions?: boolean | undefined; selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined; arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined; values?: boolean | undefined; fields?: ("ObjectTypeDefinition" | ... 1 more ... | "InputObjectTyp...' is not assignable to type 'RulesMetaDocs'.
Types of property 'category' are incompatible.
Type 'CategoryType | CategoryType[]' is not assignable to type 'string | undefined'.
Type 'CategoryType[]' is not assignable to type 'string'.ts(2322)
To Reproduce Steps to reproduce the behavior:
Expected behavior
No type error
Environment:
- OS: Ubuntu 24.04
@graphql-eslint/eslint-plugin: 4.4.0
- Node.js: 22.14.0
Additional context
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
https://github.com/graphql-hive/graphql-eslint/blob/master/examples/graphql-config/eslint.config.js shows type error on
graphql-eslint/examples/graphql-config/eslint.config.js
Lines 14 to 16 in 8c097c2
if you enable typescript for this file, or rename it to
.tsTo Reproduce Steps to reproduce the behavior:
Expected behavior
No type error
Environment:
@graphql-eslint/eslint-plugin: 4.4.0Additional context