diff --git a/.changeset/@graphql-eslint_eslint-plugin-1792-dependencies.md b/.changeset/@graphql-eslint_eslint-plugin-1792-dependencies.md deleted file mode 100644 index ff7f426e403..00000000000 --- a/.changeset/@graphql-eslint_eslint-plugin-1792-dependencies.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -dependencies updates: - -- Removed dependency - [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) (from - `dependencies`) diff --git a/.changeset/@graphql-eslint_eslint-plugin-1813-dependencies.md b/.changeset/@graphql-eslint_eslint-plugin-1813-dependencies.md deleted file mode 100644 index 3a727163f79..00000000000 --- a/.changeset/@graphql-eslint_eslint-plugin-1813-dependencies.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -dependencies updates: - -- Updated dependency - [`graphql-config@^4.5.0` ↗︎](https://www.npmjs.com/package/graphql-config/v/4.5.0) (from - `^4.4.0`, in `dependencies`) -- Removed dependency - [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) (from - `dependencies`) -- Removed dependency [`chalk@^4.1.2` ↗︎](https://www.npmjs.com/package/chalk/v/4.1.2) (from - `dependencies`) -- Removed dependency [`tslib@^2.4.1` ↗︎](https://www.npmjs.com/package/tslib/v/2.4.1) (from - `dependencies`) -- Updated dependency [`graphql@^16` ↗︎](https://www.npmjs.com/package/graphql/v/16.0.0) (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`) -- Added dependency [`eslint@>=8.44.0` ↗︎](https://www.npmjs.com/package/eslint/v/8.44.0) (to - `peerDependencies`) diff --git a/.changeset/breezy-seals-sparkle.md b/.changeset/breezy-seals-sparkle.md deleted file mode 100644 index 3dd0c629203..00000000000 --- a/.changeset/breezy-seals-sparkle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix caching issues for `no-unreachable-types` / `no-unused-fields` rules for multi projects diff --git a/.changeset/chilled-rivers-prove.md b/.changeset/chilled-rivers-prove.md deleted file mode 100644 index 39b567f06dd..00000000000 --- a/.changeset/chilled-rivers-prove.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -1. graphql plugin can now we be specified as - - ```diff - plugins: { - - '@graphql-eslint': { - - graphqlPlugin.rules - - } - + '@graphql-eslint': graphqlPlugin - } - ``` - -1. Config rules should now be accessed through the `rules` property - - ```diff - rules: { - - ...graphqlESLint.configs['flat/operations-recommended'] - + ...graphqlESLint.configs['flat/operations-recommended'].rules - ``` - -1. processor can now be specified with accessing `processor` property - - ```diff - - processor: graphql.processors.graphql - + processor: graphqlPlugin.processor - ``` - -1. The plugin can now be imported using a default import - - ```diff - - import * as graphql from '@graphql-eslint/eslint-plugin' - + import graphqlPlugin from '@graphql-eslint/eslint-plugin' - ``` diff --git a/.changeset/chilly-ants-exist.md b/.changeset/chilly-ants-exist.md deleted file mode 100644 index 38fd266022d..00000000000 --- a/.changeset/chilly-ants-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix compatibility with Node.js v22 diff --git a/.changeset/cool-spoons-explain.md b/.changeset/cool-spoons-explain.md deleted file mode 100644 index 72979899d66..00000000000 --- a/.changeset/cool-spoons-explain.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix error from `no-deprecated` rule -`4.0.0-alpha.13: node.typeInfo(...).inputType.getFields is not a function` diff --git a/.changeset/curly-socks-boil.md b/.changeset/curly-socks-boil.md deleted file mode 100644 index e5b52c308f2..00000000000 --- a/.changeset/curly-socks-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix `require is not defined` in flat configs for Vue/Svelte projects diff --git a/.changeset/dull-scissors-destroy.md b/.changeset/dull-scissors-destroy.md deleted file mode 100644 index 1197ad3c1c6..00000000000 --- a/.changeset/dull-scissors-destroy.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -- bring back `possible-type-extension` rule to `schema-recommended` config - -- add `unique-operation-name` and `unique-fragment-name` rules to `operations-recommended` config - -The 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 - -- rename `relay` config to `schema-relay` - -> To avoid confusing when users extend this config for executable definitions (operations and -> fragments) diff --git a/.changeset/empty-horses-relate.md b/.changeset/empty-horses-relate.md deleted file mode 100644 index da0cc60d94b..00000000000 --- a/.changeset/empty-horses-relate.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix false positive cases for `require-import-fragment` on Windows, when `graphql-config`'s -`documents` key contained glob pattern => source file path of document contained always forward -slashes diff --git a/.changeset/empty-singers-develop.md b/.changeset/empty-singers-develop.md deleted file mode 100644 index e346f34ed0c..00000000000 --- a/.changeset/empty-singers-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': minor ---- - -feat: add a new option `{` for alphabetize rule to sort fields `selection set` diff --git a/.changeset/fast-fishes-shake.md b/.changeset/fast-fishes-shake.md deleted file mode 100644 index f8daf4343ff..00000000000 --- a/.changeset/fast-fishes-shake.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix reporting lint issues not on first char of file for `.vue` and support ESLint fixes and -suggestions for them. Use -[new official example](https://github.com/dimaMachina/graphql-eslint/blob/master/examples/vue-code-file/eslint.config.js) diff --git a/.changeset/few-mails-sparkle.md b/.changeset/few-mails-sparkle.md deleted file mode 100644 index 954bb3d0683..00000000000 --- a/.changeset/few-mails-sparkle.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -- `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 - - - rename rule to `require-selections` - -- update `schema-all`/`operations-all` configs - -- `require-description` rule changes - - - add `rootField: true` option for `schema-recommended` config - -- require `eslint` at least `>=8.44.0` as peerDependency - -- `naming-convention` - - - add new options for `schema-recommended` config - - ```json5 - { - '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 diff --git a/.changeset/friendly-singers-rush.md b/.changeset/friendly-singers-rush.md deleted file mode 100644 index b4b33a25174..00000000000 --- a/.changeset/friendly-singers-rush.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -- rename flat configs exports - -```diff --graphql.flatConfigs['schema-recommended'] -+graphql.configs['flat/schema-recommended'] --graphql.flatConfigs['schema-relay'] -+graphql.configs['flat/schema-relay'] --graphql.flatConfigs['schema-all'] -+graphql.configs['flat/schema-all'] --graphql.flatConfigs['operations-recommended'] -+graphql.configs['flat/operations-recommended'] --graphql.flatConfigs['operations-all'] -+graphql.configs['flat/operations-all'] -``` - -- fix with programmatic usage when passing large schema as string causes `pattern too long` error - -- fix loading ESM `graphql.config.js` configs diff --git a/.changeset/healthy-moose-kneel.md b/.changeset/healthy-moose-kneel.md deleted file mode 100644 index de8eb2075d5..00000000000 --- a/.changeset/healthy-moose-kneel.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -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. diff --git a/.changeset/heavy-onions-fry.md b/.changeset/heavy-onions-fry.md deleted file mode 100644 index 93675ad8a0b..00000000000 --- a/.changeset/heavy-onions-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix types exports by `@arethetypeswrong/cli` package diff --git a/.changeset/itchy-ads-compete.md b/.changeset/itchy-ads-compete.md deleted file mode 100644 index 4eb1a723dd7..00000000000 --- a/.changeset/itchy-ads-compete.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -- 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 diff --git a/.changeset/lovely-emus-shake.md b/.changeset/lovely-emus-shake.md deleted file mode 100644 index 5ef9f51ae96..00000000000 --- a/.changeset/lovely-emus-shake.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -Add new config option `ignoredFieldSelectors` to `no-unused-fields` rule to ignore all the relay -pagination fields for every connection exposed in schema for example diff --git a/.changeset/lovely-laws-hide.md b/.changeset/lovely-laws-hide.md deleted file mode 100644 index 946fab85d1f..00000000000 --- a/.changeset/lovely-laws-hide.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -add `meta` object with `name` and `version` to `parser` and `processor` to be compatible with ESLint -9 diff --git a/.changeset/metal-wasps-type.md b/.changeset/metal-wasps-type.md deleted file mode 100644 index 9ce0ac508a5..00000000000 --- a/.changeset/metal-wasps-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix some issues on Windows by running tests with matrix on github CI diff --git a/.changeset/neat-cows-worry.md b/.changeset/neat-cows-worry.md deleted file mode 100644 index d26232ee36a..00000000000 --- a/.changeset/neat-cows-worry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -Reenable running `require-id-when-available` on `FragmentDefinition` diff --git a/.changeset/popular-ads-help.md b/.changeset/popular-ads-help.md deleted file mode 100644 index 63a17a2f9f5..00000000000 --- a/.changeset/popular-ads-help.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix - Config types don't satisfy `FlatConfig.Config` diff --git a/.changeset/popular-radios-sleep.md b/.changeset/popular-radios-sleep.md deleted file mode 100644 index 211fa5d870d..00000000000 --- a/.changeset/popular-radios-sleep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix `no-unreachable-types` to consider wrapped request directive argument types diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index e69ac4fc3b5..00000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "mode": "exit", - "tag": "alpha", - "initialVersions": { - "@graphql-eslint/example-code-file": "0.0.0", - "@graphql-eslint/example-graphql-config": "0.0.0", - "@graphql-eslint/example-monorepo": "0.0.0", - "@graphql-eslint/example-multiple-projects-graphql-config": "0.0.0", - "@graphql-eslint/example-prettier": "0.0.0", - "@graphql-eslint/example-programmatic": "0.0.0", - "@graphql-eslint/example-svelte-code-file": "0.0.0", - "@graphql-eslint/example-vue-code-file": "0.0.0", - "@graphql-eslint/eslint-plugin": "3.20.1", - "@theguild/eslint-rule-tester": "0.0.0", - "website": "0.0.0" - }, - "changesets": [ - "@graphql-eslint_eslint-plugin-1792-dependencies", - "@graphql-eslint_eslint-plugin-1813-dependencies", - "breezy-seals-sparkle", - "chilled-rivers-prove", - "chilly-ants-exist", - "cool-spoons-explain", - "curly-socks-boil", - "dull-scissors-destroy", - "empty-horses-relate", - "empty-singers-develop", - "fast-fishes-shake", - "few-mails-sparkle", - "friendly-singers-rush", - "healthy-moose-kneel", - "heavy-onions-fry", - "itchy-ads-compete", - "lovely-emus-shake", - "lovely-laws-hide", - "metal-wasps-type", - "neat-cows-worry", - "popular-ads-help", - "popular-radios-sleep", - "rare-planes-love", - "real-coins-share", - "strong-needles-compare", - "twenty-tables-help", - "unlucky-months-sit", - "weak-readers-build", - "yellow-elephants-study" - ] -} diff --git a/.changeset/rare-planes-love.md b/.changeset/rare-planes-love.md deleted file mode 100644 index 7f471704f09..00000000000 --- a/.changeset/rare-planes-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -drop support of Node.js 12/14/16, GraphQL 14/15 diff --git a/.changeset/real-coins-share.md b/.changeset/real-coins-share.md deleted file mode 100644 index df21a9c6660..00000000000 --- a/.changeset/real-coins-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -exposing GraphQLESTreeNode type diff --git a/.changeset/sour-peaches-prove.md b/.changeset/sour-peaches-prove.md deleted file mode 100644 index 954ee39dc44..00000000000 --- a/.changeset/sour-peaches-prove.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -- rename `requireSiblingsOperations` to `requireGraphQLOperations` -- rename `requireGraphQLSchemaFromContext` to `requireGraphQLSchema` diff --git a/.changeset/strong-needles-compare.md b/.changeset/strong-needles-compare.md deleted file mode 100644 index d4250b75cda..00000000000 --- a/.changeset/strong-needles-compare.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -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 - -```js -import { RuleTester } from 'eslint' - -const ruleTester = new RuleTester({ - parser: require.resolve('@graphql-eslint/eslint-plugin') -}) -``` diff --git a/.changeset/tame-tigers-own.md b/.changeset/tame-tigers-own.md deleted file mode 100644 index 797b9286e9c..00000000000 --- a/.changeset/tame-tigers-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -fix https://bit.ly/graphql-eslint-operations links diff --git a/.changeset/twenty-tables-help.md b/.changeset/twenty-tables-help.md deleted file mode 100644 index 3f07f59f67c..00000000000 --- a/.changeset/twenty-tables-help.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': major ---- - -Enforce `require-selections` on `FragmentSpread`s within `GraphQLUnionType`s diff --git a/.changeset/unlucky-months-sit.md b/.changeset/unlucky-months-sit.md deleted file mode 100644 index f80419ff942..00000000000 --- a/.changeset/unlucky-months-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': patch ---- - -`naming-convention` rule should not fail when aliasing underscore fields diff --git a/.changeset/weak-readers-build.md b/.changeset/weak-readers-build.md deleted file mode 100644 index 616df45564c..00000000000 --- a/.changeset/weak-readers-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': minor ---- - -Support the fragment spread group when defining alphabetize rule's groups with new option `...` diff --git a/.changeset/yellow-elephants-study.md b/.changeset/yellow-elephants-study.md deleted file mode 100644 index a643f822922..00000000000 --- a/.changeset/yellow-elephants-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-eslint/eslint-plugin': minor ---- - -check for deprecated arguments and object field nodes in graphql operations in `no-deprecated` rule diff --git a/examples/graphql-config/package.json b/examples/graphql-config/package.json index ea5407ffefc..8a6cfe819f2 100644 --- a/examples/graphql-config/package.json +++ b/examples/graphql-config/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@eslint/js": "9.15.0", - "@graphql-eslint/eslint-plugin": "4.0.0-alpha.16", + "@graphql-eslint/eslint-plugin": "4.0.0", "eslint": "9.15.0" } } diff --git a/packages/plugin/CHANGELOG.md b/packages/plugin/CHANGELOG.md index 76f0c1b2db5..b80131e4ace 100644 --- a/packages/plugin/CHANGELOG.md +++ b/packages/plugin/CHANGELOG.md @@ -1,5 +1,317 @@ # @graphql-eslint/eslint-plugin +## 4.0.0 + +### Major Changes + +- [#2598](https://github.com/dimaMachina/graphql-eslint/pull/2598) + [`e771499`](https://github.com/dimaMachina/graphql-eslint/commit/e771499db22ed6aa358af090b535f6206e191ebb) + Thanks [@bmulholland](https://github.com/bmulholland)! - 1. graphql plugin can now we be specified + as + + ```diff + plugins: { + - '@graphql-eslint': { + - graphqlPlugin.rules + - } + + '@graphql-eslint': graphqlPlugin + } + ``` + + 1. Config rules should now be accessed through the `rules` property + + ```diff + rules: { + - ...graphqlESLint.configs['flat/operations-recommended'] + + ...graphqlESLint.configs['flat/operations-recommended'].rules + ``` + + 1. processor can now be specified with accessing `processor` property + + ```diff + - processor: graphql.processors.graphql + + processor: graphqlPlugin.processor + ``` + + 1. The plugin can now be imported using a default import + + ```diff + - import * as graphql from '@graphql-eslint/eslint-plugin' + + import graphqlPlugin from '@graphql-eslint/eslint-plugin' + ``` + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - - bring back `possible-type-extension` + rule to `schema-recommended` config + + - add `unique-operation-name` and `unique-fragment-name` rules to `operations-recommended` config + + The 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 + + - rename `relay` config to `schema-relay` + + > To avoid confusing when users extend this config for executable definitions (operations and + > fragments) + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - - `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 + + - rename rule to `require-selections` + + - update `schema-all`/`operations-all` configs + - `require-description` rule changes + + - add `rootField: true` option for `schema-recommended` config + + - require `eslint` at least `>=8.44.0` as peerDependency + - `naming-convention` + + - add new options for `schema-recommended` config + + ```json5 + { + '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 + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - - 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 + +- [#2281](https://github.com/dimaMachina/graphql-eslint/pull/2281) + [`c53cb4e`](https://github.com/dimaMachina/graphql-eslint/commit/c53cb4e8e462f65e880cb700020602081632503c) + Thanks [@maciesielka](https://github.com/maciesielka)! - Add new config option + `ignoredFieldSelectors` to `no-unused-fields` rule to ignore all the relay pagination fields for + every connection exposed in schema for example + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - drop support of Node.js 12/14/16, GraphQL + 14/15 + +- [#2418](https://github.com/dimaMachina/graphql-eslint/pull/2418) + [`c2d5386`](https://github.com/dimaMachina/graphql-eslint/commit/c2d53869c84e7393b11239f78d55eb1477a9a077) + Thanks [@comatory](https://github.com/comatory)! - exposing GraphQLESTreeNode type + +- [#2768](https://github.com/dimaMachina/graphql-eslint/pull/2768) + [`241936a`](https://github.com/dimaMachina/graphql-eslint/commit/241936acfebef3e6201703e483776d3f952a6f0f) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - - rename `requireSiblingsOperations` to + `requireGraphQLOperations` + + - rename `requireGraphQLSchemaFromContext` to `requireGraphQLSchema` + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - 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 + + ```js + import { RuleTester } from 'eslint' + + const ruleTester = new RuleTester({ + parser: require.resolve('@graphql-eslint/eslint-plugin') + }) + ``` + +- [#2319](https://github.com/dimaMachina/graphql-eslint/pull/2319) + [`b3c73dc`](https://github.com/dimaMachina/graphql-eslint/commit/b3c73dc6f0d1de7cfb232bc0e78ab871edc247de) + Thanks [@maciesielka](https://github.com/maciesielka)! - Enforce `require-selections` on + `FragmentSpread`s within `GraphQLUnionType`s + +### Minor Changes + +- [#2385](https://github.com/dimaMachina/graphql-eslint/pull/2385) + [`afa8b8a`](https://github.com/dimaMachina/graphql-eslint/commit/afa8b8af92b8eb92595a1cc9b24c42c4e4705ed2) + Thanks [@deathemperor](https://github.com/deathemperor)! - feat: add a new option `{` for + alphabetize rule to sort fields `selection set` + +- [#2293](https://github.com/dimaMachina/graphql-eslint/pull/2293) + [`01f7087`](https://github.com/dimaMachina/graphql-eslint/commit/01f70879e5befc92acd9afffe7d2a56ee447f316) + Thanks [@yoavsion](https://github.com/yoavsion)! - Support the fragment spread group when defining + alphabetize rule's groups with new option `...` + +- [#2719](https://github.com/dimaMachina/graphql-eslint/pull/2719) + [`57d6edf`](https://github.com/dimaMachina/graphql-eslint/commit/57d6edf07226dba743b4045ddaab3c0212d738bf) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - check for deprecated arguments and object + field nodes in graphql operations in `no-deprecated` rule + +### Patch Changes + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - dependencies updates: + + - Removed dependency + [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) + (from `dependencies`) + +- [#1813](https://github.com/dimaMachina/graphql-eslint/pull/1813) + [`1c2d220`](https://github.com/dimaMachina/graphql-eslint/commit/1c2d2205a8eb1d7446e4101bb4300e6e71120e42) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - dependencies updates: + + - Updated dependency + [`graphql-config@^4.5.0` ↗︎](https://www.npmjs.com/package/graphql-config/v/4.5.0) (from + `^4.4.0`, in `dependencies`) + - Removed dependency + [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) + (from `dependencies`) + - Removed dependency [`chalk@^4.1.2` ↗︎](https://www.npmjs.com/package/chalk/v/4.1.2) (from + `dependencies`) + - Removed dependency [`tslib@^2.4.1` ↗︎](https://www.npmjs.com/package/tslib/v/2.4.1) (from + `dependencies`) + - Updated dependency [`graphql@^16` ↗︎](https://www.npmjs.com/package/graphql/v/16.0.0) (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`) + - Added dependency [`eslint@>=8.44.0` ↗︎](https://www.npmjs.com/package/eslint/v/8.44.0) (to + `peerDependencies`) + +- [#2455](https://github.com/dimaMachina/graphql-eslint/pull/2455) + [`08a8a13`](https://github.com/dimaMachina/graphql-eslint/commit/08a8a1382d51140ddf7a310de3a711b354533879) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix caching issues for + `no-unreachable-types` / `no-unused-fields` rules for multi projects + +- [#2483](https://github.com/dimaMachina/graphql-eslint/pull/2483) + [`d52585a`](https://github.com/dimaMachina/graphql-eslint/commit/d52585a08513546e1c403a6cf83de6d6370e96da) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix compatibility with Node.js v22 + +- [#2743](https://github.com/dimaMachina/graphql-eslint/pull/2743) + [`03ccb9d`](https://github.com/dimaMachina/graphql-eslint/commit/03ccb9dabcd70af92ae46a0807f6cd979317a38f) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix error from `no-deprecated` rule + `4.0.0-alpha.13: node.typeInfo(...).inputType.getFields is not a function` + +- [#2466](https://github.com/dimaMachina/graphql-eslint/pull/2466) + [`da608d7`](https://github.com/dimaMachina/graphql-eslint/commit/da608d735f7e292b15955ace2fd4b1f17406105e) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix `require is not defined` in flat + configs for Vue/Svelte projects + +- [#2277](https://github.com/dimaMachina/graphql-eslint/pull/2277) + [`3b35bae`](https://github.com/dimaMachina/graphql-eslint/commit/3b35baedacb8cdac542268933d8a8fec6c199af0) + Thanks [@yoavain-sundaysky](https://github.com/yoavain-sundaysky)! - fix false positive cases for + `require-import-fragment` on Windows, when `graphql-config`'s `documents` key contained glob + pattern => source file path of document contained always forward slashes + +- [#2735](https://github.com/dimaMachina/graphql-eslint/pull/2735) + [`ccd9303`](https://github.com/dimaMachina/graphql-eslint/commit/ccd930309957896f5d22ed59d40a67803ee77868) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix reporting lint issues not on first + char of file for `.vue` and support ESLint fixes and suggestions for them. Use + [new official example](https://github.com/dimaMachina/graphql-eslint/blob/master/examples/vue-code-file/eslint.config.js) + +- [#2468](https://github.com/dimaMachina/graphql-eslint/pull/2468) + [`733a66e`](https://github.com/dimaMachina/graphql-eslint/commit/733a66e38cb5a444ff3a2f9ed7c1b31665fca404) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - - rename flat configs exports + + ```diff + -graphql.flatConfigs['schema-recommended'] + +graphql.configs['flat/schema-recommended'] + -graphql.flatConfigs['schema-relay'] + +graphql.configs['flat/schema-relay'] + -graphql.flatConfigs['schema-all'] + +graphql.configs['flat/schema-all'] + -graphql.flatConfigs['operations-recommended'] + +graphql.configs['flat/operations-recommended'] + -graphql.flatConfigs['operations-all'] + +graphql.configs['flat/operations-all'] + ``` + + - fix with programmatic usage when passing large schema as string causes `pattern too long` error + - fix loading ESM `graphql.config.js` configs + +- [#2616](https://github.com/dimaMachina/graphql-eslint/pull/2616) + [`c0f1b07`](https://github.com/dimaMachina/graphql-eslint/commit/c0f1b077c8c7b8ee872bcee191f1acf5a8d5f62b) + Thanks [@fcortes](https://github.com/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](https://github.com/dimaMachina/graphql-eslint/pull/2605) + [`2ae64e1`](https://github.com/dimaMachina/graphql-eslint/commit/2ae64e12ab2e61c14b8a195410e2e68dc3fb29d0) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix types exports by + `@arethetypeswrong/cli` package + +- [#2458](https://github.com/dimaMachina/graphql-eslint/pull/2458) + [`9096458`](https://github.com/dimaMachina/graphql-eslint/commit/909645893d41f2ccf618b2c74fb7671ddab538b9) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - add `meta` object with `name` and + `version` to `parser` and `processor` to be compatible with ESLint 9 + +- [#2692](https://github.com/dimaMachina/graphql-eslint/pull/2692) + [`dcf4e35`](https://github.com/dimaMachina/graphql-eslint/commit/dcf4e3558e13f4350e4e0960d8e9603667cda0b2) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix some issues on Windows by running + tests with matrix on github CI + +- [#2711](https://github.com/dimaMachina/graphql-eslint/pull/2711) + [`b15df66`](https://github.com/dimaMachina/graphql-eslint/commit/b15df66b048fdd57e108a6332a6b546765685f7e) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - Reenable running + `require-id-when-available` on `FragmentDefinition` + +- [#2752](https://github.com/dimaMachina/graphql-eslint/pull/2752) + [`1e3e966`](https://github.com/dimaMachina/graphql-eslint/commit/1e3e96634a29099704c29a328955c28b060aa7dc) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix - Config types don't satisfy + `FlatConfig.Config` + +- [#2721](https://github.com/dimaMachina/graphql-eslint/pull/2721) + [`cda7929`](https://github.com/dimaMachina/graphql-eslint/commit/cda7929a69256afe3f87ef69f950d35b089775f2) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix `no-unreachable-types` to consider + wrapped request directive argument types + +- [#2763](https://github.com/dimaMachina/graphql-eslint/pull/2763) + [`baba639`](https://github.com/dimaMachina/graphql-eslint/commit/baba6392a5e4c8a43690ddd95b54bd2a22f97af2) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - fix + https://bit.ly/graphql-eslint-operations links + +- [#2713](https://github.com/dimaMachina/graphql-eslint/pull/2713) + [`8b6d46b`](https://github.com/dimaMachina/graphql-eslint/commit/8b6d46b3ceac6397c6471ce127add2daa6593e30) + Thanks [@dimaMachina](https://github.com/dimaMachina)! - `naming-convention` rule should not fail + when aliasing underscore fields + ## 4.0.0-alpha.16 ### Patch Changes diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 741af2531d7..28eb9950678 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-eslint/eslint-plugin", - "version": "4.0.0-alpha.16", + "version": "4.0.0", "type": "module", "description": "GraphQL plugin for ESLint", "repository": "https://github.com/dimaMachina/graphql-eslint",