Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
When using this plugin with ESLint v10, I immediately get an error for the alphabetize rule:
Oops! Something went wrong! :(
ESLint: 10.0.2
TypeError: Error while loading rule '@graphql-eslint/alphabetize': context.getSourceCode is not a function
To Reproduce Steps to reproduce the behavior:
Upgrade to ESLint v10
Run eslint against your code.
Expected behavior
There are no errors.
Environment:
- OS: Linux fedora 6.18.10-402.asahi.fc42.aarch64+16k
@graphql-eslint/eslint-plugin: 4.4.0
- Node.js: 24.13.0
Additional context
My flat config (only relevant portion shown):
import { defineConfig } from 'eslint/config';
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
const baseConfig = defineConfig(
{
files: ['**/*.js', '**/*.ts', '**/*.jsx', '**/*.tsx'],
processor: graphqlPlugin.processor,
plugins: {
'@graphql-eslint': graphqlPlugin,
},
rules: {
'@graphql-eslint/no-anonymous-operations': 'error',
},
},
{
files: ['**/*.graphql'],
languageOptions: {
parser: graphqlPlugin.parser,
},
plugins: {
'@graphql-eslint': graphqlPlugin,
},
rules: {
'@graphql-eslint/alphabetize': [
'error',
{
definitions: true,
fields: [
'ObjectTypeDefinition',
'InterfaceTypeDefinition',
'InputObjectTypeDefinition',
],
groups: ['id', '*', 'createdAt', 'updatedAt'],
selections: ['FragmentDefinition', 'OperationDefinition'],
values: true,
},
],
'@graphql-eslint/no-anonymous-operations': 'error',
},
},
);
export default baseConfig;
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
When using this plugin with ESLint v10, I immediately get an error for the
alphabetizerule:To Reproduce Steps to reproduce the behavior:
Upgrade to ESLint v10
Run
eslintagainst your code.Expected behavior
There are no errors.
Environment:
@graphql-eslint/eslint-plugin: 4.4.0Additional context
My flat config (only relevant portion shown):