Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #2178
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@graphql-eslint/[email protected]
Major Changes
#2598
e771499Thanks @bmulholland! - 1. graphql plugin can now we be specified
as
plugins: { - '@graphql-eslint': { - graphqlPlugin.rules - } + '@graphql-eslint': graphqlPlugin }Config rules should now be accessed through the
rulespropertyrules: { - ...graphqlESLint.configs['flat/operations-recommended'] + ...graphqlESLint.configs['flat/operations-recommended'].rulesprocessor can now be specified with accessing
processorpropertyThe plugin can now be imported using a default import
#1813
1c2d220Thanks @dimaMachina! - - bring back
possible-type-extensionrule to
schema-recommendedconfigunique-operation-nameandunique-fragment-namerules tooperations-recommendedconfigThe concept of sibling operations provided by graphql-config's
documentsfields is based onuniquely 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
relayconfig toschema-relay#1813
1c2d220Thanks @dimaMachina! - -
alphabetizerule changesadd
definitions: trueoption forschema-all/operations-allconfigsrename
values: ['EnumTypeDefinition']tovalues: truerename
variables: ['OperationDefinition']tovariables: trueadd
groups: ['id', '*', 'createdAt', 'updatedAt']forschema-all/operations-allconfigsrequire-id-when-availablerule changesrequire-selectionsupdate
schema-all/operations-allconfigsrequire-descriptionrule changesrootField: trueoption forschema-recommendedconfigrequire
eslintat least>=8.44.0as peerDependencynaming-conventionschema-recommendedconfigremove graphql-js'
unique-enum-value-namesrulerename
no-case-insensitive-enum-values-duplicatestounique-enum-value-namesrequire-nullable-result-in-rootrule changesDo not check subscriptions
#1813
1c2d220Thanks @dimaMachina! - - remove
parserOptions.schemaparserOptions.documentsparserOptions.extensionsparserOptions.includeparserOptions.excludeparserOptions.projectsparserOptions.schemaOptionsparserOptions.graphQLParserOptionsparserOptions.skipGraphQLConfigparserOptions.operationsparserOptions.graphQLConfig?: IGraphQLConfigfor programmatic usage#2281
c53cb4eThanks @maciesielka! - Add new config option
ignoredFieldSelectorstono-unused-fieldsrule to ignore all the relay pagination fields forevery connection exposed in schema for example
#1813
1c2d220Thanks @dimaMachina! - drop support of Node.js 12/14/16, GraphQL
14/15
#2418
c2d5386Thanks @comatory! - exposing GraphQLESTreeNode type
#2768
241936aThanks @dimaMachina! - - rename
requireSiblingsOperationstorequireGraphQLOperationsrequireGraphQLSchemaFromContexttorequireGraphQLSchema#1813
1c2d220Thanks @dimaMachina! - Remove
GraphQLRuleTesterfrom bundle,to test your rules use regular
RuleTesterfrom eslint#2319
b3c73dcThanks @maciesielka! - Enforce
require-selectionsonFragmentSpreads withinGraphQLUnionTypesMinor Changes
#2385
afa8b8aThanks @deathemperor! - feat: add a new option
{foralphabetize rule to sort fields
selection set#2293
01f7087Thanks @yoavsion! - Support the fragment spread group when defining
alphabetize rule's groups with new option
...#2719
57d6edfThanks @dimaMachina! - check for deprecated arguments and object
field nodes in graphql operations in
no-deprecatedrulePatch Changes
#1813
1c2d220Thanks @dimaMachina! - dependencies updates:
@babel/code-frame@^7.18.6↗︎(from
dependencies)#1813
1c2d220Thanks @dimaMachina! - dependencies updates:
graphql-config@^4.5.0↗︎ (from^4.4.0, independencies)@babel/code-frame@^7.18.6↗︎(from
dependencies)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,in
peerDependencies)eslint@>=8.44.0↗︎ (topeerDependencies)#2455
08a8a13Thanks @dimaMachina! - fix caching issues for
no-unreachable-types/no-unused-fieldsrules for multi projects#2483
d52585aThanks @dimaMachina! - fix compatibility with Node.js v22
#2743
03ccb9dThanks @dimaMachina! - fix error from
no-deprecatedrule4.0.0-alpha.13: node.typeInfo(...).inputType.getFields is not a function#2466
da608d7Thanks @dimaMachina! - fix
require is not definedin flatconfigs for Vue/Svelte projects
#2277
3b35baeThanks @yoavain-sundaysky! - fix false positive cases for
require-import-fragmenton Windows, whengraphql-config'sdocumentskey contained globpattern => source file path of document contained always forward slashes
#2735
ccd9303Thanks @dimaMachina! - fix reporting lint issues not on first
char of file for
.vueand support ESLint fixes and suggestions for them. Usenew official example
#2468
733a66eThanks @dimaMachina! - - rename flat configs exports
pattern too longerrorgraphql.config.jsconfigs#2616
c0f1b07Thanks @fcortes! - The import attribute syntax (with { type: "json"
}) is still experimental so warnings showed up when using the library as it was being used to
import the package.json file to extract the package version
As an alternative, the current version will be injected on build time through tsup configuration.
#2605
2ae64e1Thanks @dimaMachina! - fix types exports by
@arethetypeswrong/clipackage#2458
9096458Thanks @dimaMachina! - add
metaobject withnameandversiontoparserandprocessorto be compatible with ESLint 9#2692
dcf4e35Thanks @dimaMachina! - fix some issues on Windows by running
tests with matrix on github CI
#2711
b15df66Thanks @dimaMachina! - Reenable running
require-id-when-availableonFragmentDefinition#2752
1e3e966Thanks @dimaMachina! - fix - Config types don't satisfy
FlatConfig.Config#2721
cda7929Thanks @dimaMachina! - fix
no-unreachable-typesto considerwrapped request directive argument types
#2763
baba639Thanks @dimaMachina! - fix
https://bit.ly/graphql-eslint-operations links
#2713
8b6d46bThanks @dimaMachina! -
naming-conventionrule should not failwhen aliasing underscore fields