ESLint parser, plugin and set rules for GraphQL (for schema and operations). Easily customizable with custom rules. Integrates with IDEs and modern GraphQL tools.
MIT License
Bot releases are visible (Hide)
#1794
4079167e
Thanks @B2o5T! - - bring back possible-type-extension
rule to
schema-recommended
config
unique-operation-name
and unique-fragment-name
rules to operations-recommended
configThe concept of sibling operations provided by graphql-config's documents
fields is based on
uniquely named operations and fragments, for omitting false-positive/negative cases when
operations and fragments are located in separate files. For this reason, these rules must be
included in the recommended config
relay
config to schema-relay
To avoid confusing when users extend this config for executable definitions (operations and
fragments)
#1812
bf475e88
Thanks @B2o5T! - - alphabetize
rule changes
add definitions: true
option for schema-all
/operations-all
configs
rename values: ['EnumTypeDefinition']
to values: true
rename variables: ['OperationDefinition']
to variables: true
add groups: ['id', '*', 'createdAt', 'updatedAt']
for schema-all
/operations-all
configs
require-id-when-available
rule changes
require-selections
update schema-all
/operations-all
configs
require-description
rule changes
rootField: true
option for schema-recommended
configrequire eslint
at least >=8.44.0
as peerDependency
naming-convention
schema-recommended
config{
'EnumTypeDefinition,EnumTypeExtension': {
forbiddenPrefixes: ['Enum'],
forbiddenSuffixes: ['Enum']
},
'InterfaceTypeDefinition,InterfaceTypeExtension': {
forbiddenPrefixes: ['Interface'],
forbiddenSuffixes: ['Interface']
},
'UnionTypeDefinition,UnionTypeExtension': {
forbiddenPrefixes: ['Union'],
forbiddenSuffixes: ['Union']
},
'ObjectTypeDefinition,ObjectTypeExtension': {
forbiddenPrefixes: ['Type'],
forbiddenSuffixes: ['Type']
}
}
remove graphql-js' unique-enum-value-names
rule
rename no-case-insensitive-enum-values-duplicates
to unique-enum-value-names
Since this rule reports case-insensitive enum values duplicates too
require-nullable-result-in-root
rule changes
Do not check subscriptions
#1795
2f46a717
Thanks @B2o5T! - - remove parserOptions.schema
remove parserOptions.documents
remove parserOptions.extensions
remove parserOptions.include
remove parserOptions.exclude
remove parserOptions.projects
remove parserOptions.schemaOptions
remove parserOptions.graphQLParserOptions
remove parserOptions.skipGraphQLConfig
remove parserOptions.operations
add parserOptions.graphQLConfig?: IGraphQLConfig
for programmatic usage
#1793
6593482b
Thanks @B2o5T! - drop support of Node.js 12/14/16, GraphQL 14/15
#1792
804f8b61
Thanks @B2o5T! - Remove GraphQLRuleTester
from bundle, to test your
rules use regular RuleTester
from eslint
Note: with this change unnecessary dependency
@babel/code-frame
was removed too
import { RuleTester } from 'eslint'
const ruleTester = new RuleTester({
parser: require.resolve('@graphql-eslint/eslint-plugin')
})
#1813
1c2d220
Thanks @B2o5T! - dependencies updates:
graphql-config@^4.5.0
↗︎ (from^4.4.0
, in dependencies
)@babel/code-frame@^7.18.6
↗︎ (fromdependencies
)chalk@^4.1.2
↗︎ (fromdependencies
)tslib@^2.4.1
↗︎ (fromdependencies
)graphql@^16
↗︎ (from^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0
,peerDependencies
)eslint@>=8.44.0
↗︎ (topeerDependencies
)#1792
804f8b61
Thanks @B2o5T! - dependencies updates:
@babel/code-frame@^7.18.6
↗︎ (fromdependencies
)Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
40c1523
require-import-fragment
and require-nullable-result-in-root
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
0a571bb
require-nullable-result-in-root
rule toPublished by github-actions[bot] over 1 year ago
afea5fe
requiredPrefixes
, requiredSuffixes
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
9916d8d
require-import-fragment
rulePublished by github-actions[bot] over 1 year ago
#1386
c5fb2dc
Thanks @B2o5T! - The new version no longer crashes on VSCode-ESLint,
when schema/siblings contain validation errors, also, GraphQL-ESLint now has strict: true
in
tsconfig.json
and extends @typescript-eslint
recommended config 🚀
P.S. GraphQL-ESLint now has its own website, all documentation moved here. Also, it contains a new
fancy playground page 💅 for both schema/operations testing
https://the-guild.dev/graphql/eslint/play
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
#1335
2e4dfa0
Thanks @B2o5T! - support new ESLint flat config system, export
flatConfigs
#1330
bab45cc
Thanks @B2o5T! - add new rule require-nullable-fields-with-oneof
#1331
0f7afa5
Thanks @B2o5T! - add new rule require-type-pattern-with-oneof
#1144
43e2861
Thanks @TuvalSimha! - Add new option groups
to alphabetize
rule
#1303
c6d5bb7
Thanks @tshedor! - [require-description] add rootField
option for
only field definitions within Query
, Mutation
, and Subscription
root types
#1141
b1f2730
Thanks @TuvalSimha! - add new option prefix
for
match-document-filename
rule
#1314
a4f885a
Thanks @B2o5T! - add ESLint suggestions for following graphql-js
rules:
fields-on-correct-type
known-argument-names
known-type-names
possible-type-extension
scalar-leafs
value-literals-of-correct-type
#1316
1f21fc8
Thanks @FloEdelmann! - feat: add lone-executable-definition
to
require all queries, mutations, subscriptions and fragments to be located in separate files
#1338
fedec34
Thanks @B2o5T! - update graphql-config
to v4.4.0 that no longer
requires typescript
to be installed
#1334
abcfc14
Thanks @B2o5T! - add new rule no-one-place-fragments
fedec34
graphql-config@^4.4.0
↗︎ (from^4.3.6
, in dependencies
)Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] about 2 years ago
#1201 ba26511
Thanks @B2o5T! - dependencies updates:
graphql-config@^4.3.6
↗︎ (from ^4.3.5
, in dependencies
)#1198 2886adf
Thanks @B2o5T! - fix passing pluck config via graphql-config#extensions
field
rename extensions.graphqlTagPluck
to extensions.pluckConfig
fix performance regression while using processor: '@graphql-eslint/graphql'