From 12f802c354c389c13fb2f220a652683a2153da28 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sun, 26 Feb 2023 19:36:45 +0100 Subject: [PATCH] fix `require-id-when-available` check unions as well (#1467) * fix `require-id-when-available` check unions as well * fixes * fixes --- .changeset/afraid-pugs-fail.md | 5 + examples/basic/eslint.config.js | 6 +- examples/basic/package.json | 1 + examples/code-file/eslint.config.js | 3 +- examples/code-file/package.json | 1 + .../graphql-config-code-file/eslint.config.js | 3 +- .../graphql-config-code-file/package.json | 1 + examples/graphql-config/eslint.config.js | 6 +- examples/graphql-config/package.json | 1 + examples/monorepo/eslint.config.js | 6 +- examples/monorepo/package.json | 1 + examples/prettier/eslint.config.js | 3 +- examples/prettier/package.json | 1 + package.json | 8 +- .../src/rules/require-id-when-available.ts | 141 ++++--- .../tests/__snapshots__/alphabetize.spec.md | 2 +- .../__snapshots__/description-style.spec.md | 2 +- .../__snapshots__/eslint-directives.spec.md | 2 +- .../tests/__snapshots__/examples.spec.md | 2 +- .../executable-definitions.spec.md | 2 +- .../fields-on-correct-type.spec.md | 2 +- .../tests/__snapshots__/input-name.spec.md | 2 +- .../__snapshots__/known-directives.spec.md | 2 +- .../known-fragment-names.spec.md | 2 +- .../lone-executable-definition.spec.md | 2 +- .../lone-schema-definition.spec.md | 2 +- .../match-document-filename.spec.md | 2 +- .../__snapshots__/naming-convention.spec.md | 2 +- .../no-anonymous-operations.spec.md | 2 +- ...insensitive-enum-values-duplicates.spec.md | 2 +- .../tests/__snapshots__/no-deprecated.spec.md | 2 +- .../__snapshots__/no-duplicate-fields.spec.md | 2 +- .../no-hashtag-description.spec.md | 2 +- .../no-one-place-fragments.spec.md | 2 +- .../tests/__snapshots__/no-root-type.spec.md | 2 +- .../no-scalar-result-type-on-mutation.spec.md | 2 +- .../__snapshots__/no-typename-prefix.spec.md | 2 +- .../no-undefined-variables.spec.md | 2 +- .../no-unreachable-types.spec.md | 2 +- .../__snapshots__/no-unused-fields.spec.md | 2 +- .../plugin/tests/__snapshots__/parser.spec.md | 2 +- .../possible-type-extension.spec.md | 2 +- .../__snapshots__/relay-arguments.spec.md | 2 +- .../relay-connection-types.spec.md | 2 +- .../__snapshots__/relay-edge-types.spec.md | 2 +- .../__snapshots__/relay-page-info.spec.md | 2 +- .../require-deprecation-date.spec.md | 2 +- .../require-deprecation-reason.spec.md | 2 +- .../__snapshots__/require-description.spec.md | 2 +- ...d-of-type-query-in-mutation-result.spec.md | 2 +- .../require-id-when-available.spec.md | 62 ++- .../require-import-fragment.spec.md | 2 +- ...require-nullable-fields-with-oneof.spec.md | 2 +- .../require-type-pattern-with-oneof.spec.md | 2 +- .../__snapshots__/selection-set-depth.spec.md | 2 +- .../__snapshots__/strict-id-in-types.spec.md | 2 +- .../unique-fragment-name.spec.md | 2 +- .../unique-operation-name.spec.md | 2 +- .../__snapshots__/unique-type-names.spec.md | 2 +- .../tests/require-id-when-available.spec.ts | 43 +++ pnpm-lock.yaml | 363 ++++++++++++------ 61 files changed, 498 insertions(+), 243 deletions(-) create mode 100644 .changeset/afraid-pugs-fail.md diff --git a/.changeset/afraid-pugs-fail.md b/.changeset/afraid-pugs-fail.md new file mode 100644 index 00000000000..bc785292be1 --- /dev/null +++ b/.changeset/afraid-pugs-fail.md @@ -0,0 +1,5 @@ +--- +'@graphql-eslint/eslint-plugin': patch +--- + +fix `require-id-when-available` check unions as well diff --git a/examples/basic/eslint.config.js b/examples/basic/eslint.config.js index 89560abd10a..5ef75ab71c1 100644 --- a/examples/basic/eslint.config.js +++ b/examples/basic/eslint.config.js @@ -1,7 +1,11 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; +import js from '@eslint/js'; export default [ - 'eslint:recommended', + { + files: ['**/*.js'], + rules: js.configs.recommended.rules, + }, { files: ['**/*.graphql'], plugins: { diff --git a/examples/basic/package.json b/examples/basic/package.json index 3fae1911816..b7d6560f79a 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -12,6 +12,7 @@ "graphql": "16.6.0" }, "devDependencies": { + "@eslint/js": "8.35.0", "@graphql-eslint/eslint-plugin": "workspace:*", "eslint": "8.33.0" } diff --git a/examples/code-file/eslint.config.js b/examples/code-file/eslint.config.js index aa421f4dcb8..0e1c866bb7e 100644 --- a/examples/code-file/eslint.config.js +++ b/examples/code-file/eslint.config.js @@ -1,11 +1,12 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; +import js from '@eslint/js'; export default [ - 'eslint:recommended', { files: ['**/*.js'], processor: graphqlESLint.processors.graphql, rules: { + ...js.configs.recommended.rules, 'no-console': 'error', }, }, diff --git a/examples/code-file/package.json b/examples/code-file/package.json index 32585a98371..21fa0b194c4 100644 --- a/examples/code-file/package.json +++ b/examples/code-file/package.json @@ -12,6 +12,7 @@ "graphql": "16.6.0" }, "devDependencies": { + "@eslint/js": "8.35.0", "@graphql-eslint/eslint-plugin": "workspace:*", "eslint": "8.33.0" } diff --git a/examples/graphql-config-code-file/eslint.config.js b/examples/graphql-config-code-file/eslint.config.js index 517230ba389..1d159b78972 100644 --- a/examples/graphql-config-code-file/eslint.config.js +++ b/examples/graphql-config-code-file/eslint.config.js @@ -1,10 +1,11 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; +import js from '@eslint/js'; export default [ - 'eslint:recommended', { files: ['**/*.js'], processor: graphqlESLint.processors.graphql, + rules: js.configs.recommended.rules, }, { files: ['**/*.graphql'], diff --git a/examples/graphql-config-code-file/package.json b/examples/graphql-config-code-file/package.json index edb47273a3b..4dae1445220 100644 --- a/examples/graphql-config-code-file/package.json +++ b/examples/graphql-config-code-file/package.json @@ -13,6 +13,7 @@ "graphql-tag": "2.12.6" }, "devDependencies": { + "@eslint/js": "8.35.0", "@graphql-eslint/eslint-plugin": "workspace:*", "eslint": "8.33.0" } diff --git a/examples/graphql-config/eslint.config.js b/examples/graphql-config/eslint.config.js index d7f4648a43d..9c3da69ae4d 100644 --- a/examples/graphql-config/eslint.config.js +++ b/examples/graphql-config/eslint.config.js @@ -1,7 +1,11 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; +import js from '@eslint/js'; export default [ - 'eslint:recommended', + { + files: ['**/*.js'], + rules: js.configs.recommended.rules, + }, { files: ['**/*.graphql'], plugins: { diff --git a/examples/graphql-config/package.json b/examples/graphql-config/package.json index e16c95bcd6b..74a9f13a675 100644 --- a/examples/graphql-config/package.json +++ b/examples/graphql-config/package.json @@ -12,6 +12,7 @@ "graphql": "16.6.0" }, "devDependencies": { + "@eslint/js": "8.35.0", "@graphql-eslint/eslint-plugin": "workspace:*", "eslint": "8.33.0" } diff --git a/examples/monorepo/eslint.config.js b/examples/monorepo/eslint.config.js index 7974b0d994b..5b43a6c4077 100644 --- a/examples/monorepo/eslint.config.js +++ b/examples/monorepo/eslint.config.js @@ -1,10 +1,14 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; +import js from '@eslint/js'; const SCHEMA_PATH = 'server/**/*.gql'; const OPERATIONS_PATH = 'client/**/*.{tsx,gql}'; export default [ - 'eslint:recommended', + { + files: ['**/*.{js,tsx}'], + rules: js.configs.recommended.rules, + }, { files: ['client/**/*.tsx'], // Setup processor for operations/fragments definitions on code-files diff --git a/examples/monorepo/package.json b/examples/monorepo/package.json index fbf84863282..9bc8c9e7378 100644 --- a/examples/monorepo/package.json +++ b/examples/monorepo/package.json @@ -11,6 +11,7 @@ "graphql": "16.6.0" }, "devDependencies": { + "@eslint/js": "8.35.0", "@graphql-eslint/eslint-plugin": "workspace:*", "eslint": "8.33.0" } diff --git a/examples/prettier/eslint.config.js b/examples/prettier/eslint.config.js index 0f61abdbbd5..61c2573ccb8 100644 --- a/examples/prettier/eslint.config.js +++ b/examples/prettier/eslint.config.js @@ -1,9 +1,9 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; import prettierPlugin from 'eslint-plugin-prettier'; import prettierConfig from 'eslint-config-prettier'; +import js from '@eslint/js'; export default [ - 'eslint:recommended', { plugins: { prettier: prettierPlugin, @@ -13,6 +13,7 @@ export default [ files: ['**/*.js'], processor: graphqlESLint.processors.graphql, rules: { + ...js.configs.recommended.rules, ...prettierConfig.rules, ...prettierPlugin.configs.recommended.rules, }, diff --git a/examples/prettier/package.json b/examples/prettier/package.json index a43a3c8838b..09e4406b298 100644 --- a/examples/prettier/package.json +++ b/examples/prettier/package.json @@ -12,6 +12,7 @@ "graphql": "16.6.0" }, "devDependencies": { + "@eslint/js": "8.35.0", "@graphql-eslint/eslint-plugin": "workspace:*", "eslint": "8.33.0", "eslint-config-prettier": "8.6.0", diff --git a/package.json b/package.json index febd733d105..bcec77c3005 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "chalk": "4.1.2", "dedent": "0.7.0", "enquirer": "2.3.6", - "eslint": "8.33.0", + "eslint": "8.35.0", "eslint-plugin-eslint-plugin": "5.0.7", "eslint-plugin-tailwindcss": "3.9.0", "husky": "8.0.3", @@ -42,17 +42,17 @@ "rimraf": "4.1.2", "tsx": "3.12.3", "typescript": "4.9.5", - "vitest": "0.28.4" + "vitest": "0.29.1" }, "resolutions": { "graphql": "16.6.0" }, "pnpm": { "patchedDependencies": { - "eslint@8.33.0": "patches/eslint@8.31.0.patch", + "eslint@8.35.0": "patches/eslint@8.31.0.patch", "eslint-plugin-eslint-plugin@5.0.7": "patches/eslint-plugin-eslint-plugin@5.0.6.patch", "json-schema-to-markdown@1.1.1": "patches/json-schema-to-markdown@1.1.1.patch", - "@vitest/runner@0.28.4": "patches/@vitest__runner@0.28.4.patch" + "@vitest/runner@0.29.1": "patches/@vitest__runner@0.28.4.patch" } } } diff --git a/packages/plugin/src/rules/require-id-when-available.ts b/packages/plugin/src/rules/require-id-when-available.ts index 466d51f463f..1ed8e649081 100644 --- a/packages/plugin/src/rules/require-id-when-available.ts +++ b/packages/plugin/src/rules/require-id-when-available.ts @@ -5,6 +5,7 @@ import { GraphQLInterfaceType, GraphQLObjectType, GraphQLOutputType, + GraphQLUnionType, Kind, SelectionSetNode, TypeInfo, @@ -165,83 +166,101 @@ export const rule: GraphQLESLintRule = { checkedFragmentSpreads = new Set(), ): void { const rawType = getBaseType(type); - const isObjectType = rawType instanceof GraphQLObjectType; - const isInterfaceType = rawType instanceof GraphQLInterfaceType; - if (!isObjectType && !isInterfaceType) { - return; + if (rawType instanceof GraphQLObjectType || rawType instanceof GraphQLInterfaceType) { + checkFields(rawType); + } else if (rawType instanceof GraphQLUnionType) { + for (const selection of node.selections) { + if (selection.kind === Kind.INLINE_FRAGMENT) { + const types = rawType.getTypes(); + const t = types.find(t => t.name === selection.typeCondition!.name.value); + if (t) { + checkFields(t); + } + } + } } - const fields = rawType.getFields(); - const hasIdFieldInType = idNames.some(name => fields[name]); - if (!hasIdFieldInType) { - return; - } + function checkFields(rawType: GraphQLInterfaceType | GraphQLObjectType) { + const fields = rawType.getFields(); + const hasIdFieldInType = idNames.some(name => fields[name]); - function hasIdField({ selections }: typeof node): boolean { - return selections.some(selection => { - if (selection.kind === Kind.FIELD) { - if (selection.alias && idNames.includes(selection.alias.value)) { - return true; - } + if (!hasIdFieldInType) { + return; + } - return idNames.includes(selection.name.value); - } + function hasIdField({ selections }: typeof node): boolean { + return selections.some(selection => { + if (selection.kind === Kind.FIELD) { + if (selection.alias && idNames.includes(selection.alias.value)) { + return true; + } - if (selection.kind === Kind.INLINE_FRAGMENT) { - return hasIdField(selection.selectionSet); - } + return idNames.includes(selection.name.value); + } - if (selection.kind === Kind.FRAGMENT_SPREAD) { - const [foundSpread] = siblings.getFragment(selection.name.value); - if (foundSpread) { - const fragmentSpread = foundSpread.document; - checkedFragmentSpreads.add(fragmentSpread.name.value); - return hasIdField(fragmentSpread.selectionSet); + if (selection.kind === Kind.INLINE_FRAGMENT) { + return hasIdField(selection.selectionSet); } - } - return false; - }); - } - const hasId = hasIdField(node); + if (selection.kind === Kind.FRAGMENT_SPREAD) { + const [foundSpread] = siblings.getFragment(selection.name.value); + if (foundSpread) { + const fragmentSpread = foundSpread.document; + checkedFragmentSpreads.add(fragmentSpread.name.value); + return hasIdField(fragmentSpread.selectionSet); + } + } + return false; + }); + } + + const hasId = hasIdField(node); - checkFragments(node as GraphQLESTreeNode); + checkFragments(node as GraphQLESTreeNode); - if (hasId) { - return; - } + if (hasId) { + return; + } - const pluralSuffix = idNames.length > 1 ? 's' : ''; - const fieldName = englishJoinWords( - idNames.map(name => `\`${(parent.alias || parent.name).value}.${name}\``), - ); + const pluralSuffix = idNames.length > 1 ? 's' : ''; + const fieldName = englishJoinWords( + idNames.map(name => `\`${(parent.alias || parent.name).value}.${name}\``), + ); - const addition = - checkedFragmentSpreads.size === 0 - ? '' - : ` or add to used fragment${ - checkedFragmentSpreads.size > 1 ? 's' : '' - } ${englishJoinWords([...checkedFragmentSpreads].map(name => `\`${name}\``))}`; + const addition = + checkedFragmentSpreads.size === 0 + ? '' + : ` or add to used fragment${ + checkedFragmentSpreads.size > 1 ? 's' : '' + } ${englishJoinWords([...checkedFragmentSpreads].map(name => `\`${name}\``))}`; - const problem: ReportDescriptor = { - loc, - messageId: RULE_ID, - data: { - pluralSuffix, - fieldName, - addition, - }, - }; + const problem: ReportDescriptor = { + loc, + messageId: RULE_ID, + data: { + pluralSuffix, + fieldName, + addition, + }, + }; - // Don't provide suggestions for selections in fragments as fragment can be in a separate file - if ('type' in node) { - problem.suggest = idNames.map(idName => ({ - desc: `Add \`${idName}\` selection`, - fix: fixer => fixer.insertTextBefore((node as any).selections[0], `${idName} `), - })); + // Don't provide suggestions for selections in fragments as fragment can be in a separate file + if ('type' in node) { + problem.suggest = idNames.map(idName => ({ + desc: `Add \`${idName}\` selection`, + fix: fixer => { + let insertNode = (node as any).selections[0]; + insertNode = + insertNode.kind === Kind.INLINE_FRAGMENT + ? insertNode.selectionSet.selections[0] + : insertNode; + return fixer.insertTextBefore(insertNode, `${idName} `); + }, + })); + } + context.report(problem); } - context.report(problem); } return { diff --git a/packages/plugin/tests/__snapshots__/alphabetize.spec.md b/packages/plugin/tests/__snapshots__/alphabetize.spec.md index e76d4d3b3f3..8af5517fc5d 100644 --- a/packages/plugin/tests/__snapshots__/alphabetize.spec.md +++ b/packages/plugin/tests/__snapshots__/alphabetize.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/description-style.spec.md b/packages/plugin/tests/__snapshots__/description-style.spec.md index a05ddeb63e4..f63246ed401 100644 --- a/packages/plugin/tests/__snapshots__/description-style.spec.md +++ b/packages/plugin/tests/__snapshots__/description-style.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/eslint-directives.spec.md b/packages/plugin/tests/__snapshots__/eslint-directives.spec.md index feddfc05628..88a2604eb82 100644 --- a/packages/plugin/tests/__snapshots__/eslint-directives.spec.md +++ b/packages/plugin/tests/__snapshots__/eslint-directives.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/examples.spec.md b/packages/plugin/tests/__snapshots__/examples.spec.md index 349dff7cb84..4cdbbf5a43a 100644 --- a/packages/plugin/tests/__snapshots__/examples.spec.md +++ b/packages/plugin/tests/__snapshots__/examples.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Examples > should work in monorepo 1`] = ` [ diff --git a/packages/plugin/tests/__snapshots__/executable-definitions.spec.md b/packages/plugin/tests/__snapshots__/executable-definitions.spec.md index e7d9a9c97e5..12111cd18b1 100644 --- a/packages/plugin/tests/__snapshots__/executable-definitions.spec.md +++ b/packages/plugin/tests/__snapshots__/executable-definitions.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md b/packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md index a7719ebaa4d..f69d285c9e1 100644 --- a/packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md +++ b/packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should highlight selection on multi line 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/input-name.spec.md b/packages/plugin/tests/__snapshots__/input-name.spec.md index 835ea348119..9387a7b7bb0 100644 --- a/packages/plugin/tests/__snapshots__/input-name.spec.md +++ b/packages/plugin/tests/__snapshots__/input-name.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/known-directives.spec.md b/packages/plugin/tests/__snapshots__/known-directives.spec.md index 53ca8f9c612..897dc0e13ef 100644 --- a/packages/plugin/tests/__snapshots__/known-directives.spec.md +++ b/packages/plugin/tests/__snapshots__/known-directives.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should work only with Kind.FIELD 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/known-fragment-names.spec.md b/packages/plugin/tests/__snapshots__/known-fragment-names.spec.md index 89b70b7a369..e0898008a60 100644 --- a/packages/plugin/tests/__snapshots__/known-fragment-names.spec.md +++ b/packages/plugin/tests/__snapshots__/known-fragment-names.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should not throw an error on undefined fragment 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md b/packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md index 608d4a52277..1de57f9fcee 100644 --- a/packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md +++ b/packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should allow fragments if they are ignored 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md b/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md index 02fba9c10db..699f53b7a09 100644 --- a/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md +++ b/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/match-document-filename.spec.md b/packages/plugin/tests/__snapshots__/match-document-filename.spec.md index 592d0ff779e..e612dea0142 100644 --- a/packages/plugin/tests/__snapshots__/match-document-filename.spec.md +++ b/packages/plugin/tests/__snapshots__/match-document-filename.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/naming-convention.spec.md b/packages/plugin/tests/__snapshots__/naming-convention.spec.md index b0828f66ae2..044e25a84ef 100644 --- a/packages/plugin/tests/__snapshots__/naming-convention.spec.md +++ b/packages/plugin/tests/__snapshots__/naming-convention.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md b/packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md index 29767de2e53..aec338a2840 100644 --- a/packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md +++ b/packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md b/packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md index b726164be0b..01509236287 100644 --- a/packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md +++ b/packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-deprecated.spec.md b/packages/plugin/tests/__snapshots__/no-deprecated.spec.md index 48cd849f176..7d0bacc44bb 100644 --- a/packages/plugin/tests/__snapshots__/no-deprecated.spec.md +++ b/packages/plugin/tests/__snapshots__/no-deprecated.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md b/packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md index aa76bf77614..5f6300a0b32 100644 --- a/packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md +++ b/packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md b/packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md index 48a2c03d045..b13002be752 100644 --- a/packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md +++ b/packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md b/packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md index cab3bad065d..e8c32fabfb0 100644 --- a/packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md +++ b/packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should error fragment used in one place 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-root-type.spec.md b/packages/plugin/tests/__snapshots__/no-root-type.spec.md index 1320f621b42..bdb0ce7b29e 100644 --- a/packages/plugin/tests/__snapshots__/no-root-type.spec.md +++ b/packages/plugin/tests/__snapshots__/no-root-type.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`disallow mutation 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md b/packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md index aee74b88292..503f1c74730 100644 --- a/packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md +++ b/packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #2 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md b/packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md index 98bafa94bc9..42a69885ad6 100644 --- a/packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md +++ b/packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md b/packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md index 8c7e05730fe..f9d072f5080 100644 --- a/packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md +++ b/packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md b/packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md index 93541934e2a..e530be8116c 100644 --- a/packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md +++ b/packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/no-unused-fields.spec.md b/packages/plugin/tests/__snapshots__/no-unused-fields.spec.md index 3c6e35f044b..3b6bb6d7bb9 100644 --- a/packages/plugin/tests/__snapshots__/no-unused-fields.spec.md +++ b/packages/plugin/tests/__snapshots__/no-unused-fields.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/parser.spec.md b/packages/plugin/tests/__snapshots__/parser.spec.md index 92b426af4b1..2bb6f0fd4cf 100644 --- a/packages/plugin/tests/__snapshots__/parser.spec.md +++ b/packages/plugin/tests/__snapshots__/parser.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Parser > parseForESLint() should return ast and tokens 1`] = ` { diff --git a/packages/plugin/tests/__snapshots__/possible-type-extension.spec.md b/packages/plugin/tests/__snapshots__/possible-type-extension.spec.md index 3c19863111a..0e8536a5594 100644 --- a/packages/plugin/tests/__snapshots__/possible-type-extension.spec.md +++ b/packages/plugin/tests/__snapshots__/possible-type-extension.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/relay-arguments.spec.md b/packages/plugin/tests/__snapshots__/relay-arguments.spec.md index b0b7a253f83..c122b0c2def 100644 --- a/packages/plugin/tests/__snapshots__/relay-arguments.spec.md +++ b/packages/plugin/tests/__snapshots__/relay-arguments.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/relay-connection-types.spec.md b/packages/plugin/tests/__snapshots__/relay-connection-types.spec.md index a704eceb062..e85124b3c1b 100644 --- a/packages/plugin/tests/__snapshots__/relay-connection-types.spec.md +++ b/packages/plugin/tests/__snapshots__/relay-connection-types.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`\`edges\` field should return a list type that wraps an edge type 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/relay-edge-types.spec.md b/packages/plugin/tests/__snapshots__/relay-edge-types.spec.md index 7853c77338f..ba9a0f29522 100644 --- a/packages/plugin/tests/__snapshots__/relay-edge-types.spec.md +++ b/packages/plugin/tests/__snapshots__/relay-edge-types.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Edge type must be Object type 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/relay-page-info.spec.md b/packages/plugin/tests/__snapshots__/relay-page-info.spec.md index 7de3d16221b..99649777bd5 100644 --- a/packages/plugin/tests/__snapshots__/relay-page-info.spec.md +++ b/packages/plugin/tests/__snapshots__/relay-page-info.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md b/packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md index 85390a3fb24..a1bace95299 100644 --- a/packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md +++ b/packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md b/packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md index 7dc634f4ba3..f371695adb5 100644 --- a/packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md +++ b/packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-description.spec.md b/packages/plugin/tests/__snapshots__/require-description.spec.md index df685e49ee3..d9919b918cb 100644 --- a/packages/plugin/tests/__snapshots__/require-description.spec.md +++ b/packages/plugin/tests/__snapshots__/require-description.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md b/packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md index 76a2ac7d14f..421cb6b7366 100644 --- a/packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md +++ b/packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #2 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-id-when-available.spec.md b/packages/plugin/tests/__snapshots__/require-id-when-available.spec.md index 91338499553..f7cd4687624 100644 --- a/packages/plugin/tests/__snapshots__/require-id-when-available.spec.md +++ b/packages/plugin/tests/__snapshots__/require-id-when-available.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code @@ -110,6 +110,66 @@ exports[`should report an error about missing \`user.id\`, \`posts.id\`, \`autho Include it in your selection set or add to used fragments \`UserFullFields\` or \`UserFields\`. `; +exports[`should report an error with union 1`] = ` +#### ⌨️ Code + + 1 | { + 2 | userOrPost { + 3 | ... on User { + 4 | title + 5 | } + 6 | } + 7 | } + +#### ❌ Error + + 1 | { + > 2 | userOrPost { + | ^ Field \`userOrPost.id\` must be selected when it's available on a type. + Include it in your selection set. + 3 | ... on User { + +#### 💡 Suggestion: Add \`id\` selection + + 1 | { + 2 | userOrPost { + 3 | ... on User { + 4 | id title + 5 | } + 6 | } + 7 | } +`; + +exports[`should report an error with union and fragment spread 1`] = ` +#### ⌨️ Code + + 1 | { + 2 | userOrPost { + 3 | ... on User { + 4 | ...UserFields + 5 | } + 6 | } + 7 | } + +#### ❌ Error + + 1 | { + > 2 | userOrPost { + | ^ Field \`userOrPost.id\` must be selected when it's available on a type. + Include it in your selection set or add to used fragment \`UserFields\`. + 3 | ... on User { + +#### 💡 Suggestion: Add \`id\` selection + + 1 | { + 2 | userOrPost { + 3 | ... on User { + 4 | id ...UserFields + 5 | } + 6 | } + 7 | } +`; + exports[`support multiple id field names 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-import-fragment.spec.md b/packages/plugin/tests/__snapshots__/require-import-fragment.spec.md index 8f667b2372d..803e15db845 100644 --- a/packages/plugin/tests/__snapshots__/require-import-fragment.spec.md +++ b/packages/plugin/tests/__snapshots__/require-import-fragment.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should report fragments when there are no import expressions 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md b/packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md index 68f8df0cd0a..adf7272677f 100644 --- a/packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md +++ b/packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should validate \`input\` 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md b/packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md index d8befc8a36a..87f05186b22 100644 --- a/packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md +++ b/packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should validate \`error\` field 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/selection-set-depth.spec.md b/packages/plugin/tests/__snapshots__/selection-set-depth.spec.md index a6476eb9b70..33c9363275c 100644 --- a/packages/plugin/tests/__snapshots__/selection-set-depth.spec.md +++ b/packages/plugin/tests/__snapshots__/selection-set-depth.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md b/packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md index 84a07c8c7df..dca3e9d35d0 100644 --- a/packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md +++ b/packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md b/packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md index 59f4577a9de..2b3b8fcd943 100644 --- a/packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md +++ b/packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/unique-operation-name.spec.md b/packages/plugin/tests/__snapshots__/unique-operation-name.spec.md index a22cde2198a..45151f7058b 100644 --- a/packages/plugin/tests/__snapshots__/unique-operation-name.spec.md +++ b/packages/plugin/tests/__snapshots__/unique-operation-name.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/__snapshots__/unique-type-names.spec.md b/packages/plugin/tests/__snapshots__/unique-type-names.spec.md index 4c2c2fce68d..3e505092477 100644 --- a/packages/plugin/tests/__snapshots__/unique-type-names.spec.md +++ b/packages/plugin/tests/__snapshots__/unique-type-names.spec.md @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Invalid #1 1`] = ` #### ⌨️ Code diff --git a/packages/plugin/tests/require-id-when-available.spec.ts b/packages/plugin/tests/require-id-when-available.spec.ts index 383d206b8d0..4ed1e43abb7 100644 --- a/packages/plugin/tests/require-id-when-available.spec.ts +++ b/packages/plugin/tests/require-id-when-available.spec.ts @@ -53,7 +53,10 @@ const USER_POST_SCHEMA = /* GraphQL */ ` type Query { user: User + userOrPost: UserOrPost } + + union UserOrPost = User | Post `; const WITH_SCHEMA = { @@ -66,6 +69,16 @@ const WITH_SCHEMA = { const ruleTester = new GraphQLRuleTester(); const MESSAGE_ID = { messageId: 'require-id-when-available' }; +const DOCUMENT_WITH_UNION = /* GraphQL */ ` + { + userOrPost { + ... on User { + title + } + } + } +`; + ruleTester.runGraphQLTests('require-id-when-available', rule, { valid: [ { @@ -357,5 +370,35 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, `, }, }, + { + name: 'should report an error with union', + errors: [MESSAGE_ID], + code: DOCUMENT_WITH_UNION, + parserOptions: { + schema: USER_POST_SCHEMA, + documents: DOCUMENT_WITH_UNION, + }, + }, + { + name: 'should report an error with union and fragment spread', + errors: [MESSAGE_ID], + code: /* GraphQL */ ` + { + userOrPost { + ... on User { + ...UserFields + } + } + } + `, + parserOptions: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserFields on User { + name + } + `, + }, + }, ], }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d2405dbcd7..cd403310d9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,18 +4,18 @@ overrides: graphql: 16.6.0 patchedDependencies: - json-schema-to-markdown@1.1.1: - hash: beglqnggvhpsclgwbdw27hzvu4 - path: patches/json-schema-to-markdown@1.1.1.patch - eslint-plugin-eslint-plugin@5.0.7: - hash: cdhdgvmsbh3fbusrlxsl6de2he - path: patches/eslint-plugin-eslint-plugin@5.0.6.patch - eslint@8.33.0: + eslint@8.35.0: hash: v7lv2hbnxmm2b22qo3sob3rjvq path: patches/eslint@8.31.0.patch - '@vitest/runner@0.28.4': + '@vitest/runner@0.29.1': hash: 22k4fsskoeieob62btkupydhfa path: patches/@vitest__runner@0.28.4.patch + eslint-plugin-eslint-plugin@5.0.7: + hash: cdhdgvmsbh3fbusrlxsl6de2he + path: patches/eslint-plugin-eslint-plugin@5.0.6.patch + json-schema-to-markdown@1.1.1: + hash: beglqnggvhpsclgwbdw27hzvu4 + path: patches/json-schema-to-markdown@1.1.1.patch importers: @@ -32,7 +32,7 @@ importers: chalk: 4.1.2 dedent: 0.7.0 enquirer: 2.3.6 - eslint: 8.33.0 + eslint: 8.35.0 eslint-plugin-eslint-plugin: 5.0.7 eslint-plugin-tailwindcss: 3.9.0 husky: 8.0.3 @@ -43,12 +43,12 @@ importers: rimraf: 4.1.2 tsx: 3.12.3 typescript: 4.9.5 - vitest: 0.28.4 + vitest: 0.29.1 devDependencies: '@changesets/changelog-github': 0.4.8 '@changesets/cli': 2.26.0 '@graphql-tools/utils': 9.2.1 - '@theguild/eslint-config': 0.8.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@theguild/eslint-config': 0.8.0_ycpbpc6yetojsgtrx3mwntkhsu '@theguild/prettier-config': 1.1.2_prettier@2.8.4 '@types/dedent': 0.7.0 '@types/node': 18.14.1 @@ -56,8 +56,8 @@ importers: chalk: 4.1.2 dedent: 0.7.0 enquirer: 2.3.6 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-plugin-eslint-plugin: 5.0.7_cdhdgvmsbh3fbusrlxsl6de2he_eslint@8.33.0 + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-plugin-eslint-plugin: 5.0.7_cdhdgvmsbh3fbusrlxsl6de2he_eslint@8.35.0 eslint-plugin-tailwindcss: 3.9.0 husky: 8.0.3 jest-snapshot-serializer-raw: 1.2.0 @@ -67,43 +67,50 @@ importers: rimraf: 4.1.2 tsx: 3.12.3 typescript: 4.9.5 - vitest: 0.28.4 + vitest: 0.29.1 examples/basic: specifiers: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': workspace:* eslint: 8.33.0 graphql: 16.6.0 dependencies: graphql: 16.6.0 devDependencies: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 examples/code-file: specifiers: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': workspace:* eslint: 8.33.0 graphql: 16.6.0 dependencies: graphql: 16.6.0 devDependencies: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 examples/graphql-config: specifiers: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': workspace:* eslint: 8.33.0 graphql: 16.6.0 dependencies: graphql: 16.6.0 devDependencies: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 examples/graphql-config-code-file: specifiers: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': workspace:* eslint: 8.33.0 graphql: 16.6.0 @@ -112,19 +119,22 @@ importers: graphql: 16.6.0 graphql-tag: 2.12.6_graphql@16.6.0 devDependencies: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 examples/monorepo: specifiers: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': workspace:* eslint: 8.33.0 graphql: 16.6.0 dependencies: graphql: 16.6.0 devDependencies: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 examples/multiple-projects-graphql-config: specifiers: @@ -139,12 +149,13 @@ importers: devDependencies: '@graphql-eslint/eslint-plugin': link:../../packages/plugin cosmiconfig-typescript-loader: 4.3.0_6qtx7vkbdhwvdm4crzlegk4mvi - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 ts-node: 10.9.1_typescript@4.9.5 typescript: 4.9.5 examples/prettier: specifiers: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': workspace:* eslint: 8.33.0 eslint-config-prettier: 8.6.0 @@ -154,8 +165,9 @@ importers: dependencies: graphql: 16.6.0 devDependencies: + '@eslint/js': 8.35.0 '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 eslint-config-prettier: 8.6.0_eslint@8.33.0 eslint-plugin-prettier: 4.2.1_qa2thblfovmfepmgrc7z2owbo4 prettier: 2.8.4 @@ -172,7 +184,7 @@ importers: graphql: 16.6.0 devDependencies: '@graphql-eslint/eslint-plugin': link:../../packages/plugin - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 svelte: 3.55.1 svelte-eslint-parser: 0.23.0_svelte@3.55.1 svelte2tsx: 0.6.2_svelte@3.55.1 @@ -189,7 +201,7 @@ importers: devDependencies: '@graphql-eslint/eslint-plugin': link:../../packages/plugin '@vue/compiler-sfc': 3.2.47 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 vue-eslint-parser: 9.1.0_eslint@8.33.0 packages/plugin: @@ -1149,13 +1161,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils/4.1.2_eslint@8.33.0: + /@eslint-community/eslint-utils/4.1.2_eslint@8.35.0: resolution: {integrity: sha512-7qELuQWWjVDdVsFQ5+beUl+KPczrEDA7S3zM4QUd/bJl7oXgsmpXaEVqrRTnOBqenOV4rWf2kVZk2Ot085zPWA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq eslint-visitor-keys: 3.3.0 dev: true @@ -1176,6 +1188,28 @@ packages: - supports-color dev: true + /@eslint/eslintrc/2.0.0: + resolution: {integrity: sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.4.1 + globals: 13.20.0 + ignore: 5.2.4 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js/8.35.0: + resolution: {integrity: sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@floating-ui/core/0.7.3: resolution: {integrity: sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg==} dev: false @@ -2352,28 +2386,28 @@ packages: - webpack dev: false - /@theguild/eslint-config/0.8.0_4vsywjlpuriuw3tl5oq6zy5a64: + /@theguild/eslint-config/0.8.0_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-OAXxluL5yA0z85t+zIJf4tibzOfEhY/RyD4AaI7NJc8iZ88mDIBasdiErBFhlRMa4GLfg6hvKdqeI6x/2ZGf7Q==} peerDependencies: eslint: ^8.24.0 dependencies: '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/eslint-plugin': 5.50.0_go4drrxstycfikanvu45pi4vgq - '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-config-prettier: 8.6.0_eslint@8.33.0 - eslint-import-resolver-typescript: 3.5.3_ohdts44xlqyeyrlje4qnefqeay - eslint-plugin-import: 2.27.5_nowqz4jutkd4a233czbfk7jsgu - eslint-plugin-jsonc: 2.6.0_eslint@8.33.0 - eslint-plugin-jsx-a11y: 6.7.1_eslint@8.33.0 - eslint-plugin-mdx: 2.0.5_eslint@8.33.0 - eslint-plugin-n: 15.6.1_eslint@8.33.0 - eslint-plugin-promise: 6.1.1_eslint@8.33.0 - eslint-plugin-react: 7.32.2_eslint@8.33.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.33.0 - eslint-plugin-sonarjs: 0.18.0_eslint@8.33.0 - eslint-plugin-unicorn: 45.0.2_eslint@8.33.0 - eslint-plugin-yml: 1.4.0_eslint@8.33.0 + '@typescript-eslint/eslint-plugin': 5.50.0_hs5mtcss2gpumxfaj5n55c53ru + '@typescript-eslint/parser': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-config-prettier: 8.6.0_eslint@8.35.0 + eslint-import-resolver-typescript: 3.5.3_yckic57kx266ph64dhq6ozvb54 + eslint-plugin-import: 2.27.5_xryalclnoqvokixzrgti522q2m + eslint-plugin-jsonc: 2.6.0_eslint@8.35.0 + eslint-plugin-jsx-a11y: 6.7.1_eslint@8.35.0 + eslint-plugin-mdx: 2.0.5_eslint@8.35.0 + eslint-plugin-n: 15.6.1_eslint@8.35.0 + eslint-plugin-promise: 6.1.1_eslint@8.35.0 + eslint-plugin-react: 7.32.2_eslint@8.35.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.35.0 + eslint-plugin-sonarjs: 0.18.0_eslint@8.35.0 + eslint-plugin-unicorn: 45.0.2_eslint@8.35.0 + eslint-plugin-yml: 1.4.0_eslint@8.35.0 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -2607,7 +2641,7 @@ packages: '@types/node': 18.14.1 dev: false - /@typescript-eslint/eslint-plugin/5.50.0_go4drrxstycfikanvu45pi4vgq: + /@typescript-eslint/eslint-plugin/5.50.0_hs5mtcss2gpumxfaj5n55c53ru: resolution: {integrity: sha512-vwksQWSFZiUhgq3Kv7o1Jcj0DUNylwnIlGvKvLLYsq8pAWha6/WCnXUeaSoNNha/K7QSf2+jvmkxggC1u3pIwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2618,12 +2652,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/parser': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu '@typescript-eslint/scope-manager': 5.50.0 - '@typescript-eslint/type-utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 - '@typescript-eslint/utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/type-utils': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu + '@typescript-eslint/utils': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu debug: 4.3.4 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -2635,7 +2669,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64: + /@typescript-eslint/parser/5.50.0_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-KCcSyNaogUDftK2G9RXfQyOCt51uB5yqC6pkUYqhYh8Kgt+DwR5M0EwEAxGPy/+DH6hnmKeGsNhiZRQxjH71uQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2649,7 +2683,7 @@ packages: '@typescript-eslint/types': 5.50.0 '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 debug: 4.3.4 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -2663,7 +2697,7 @@ packages: '@typescript-eslint/visitor-keys': 5.50.0 dev: true - /@typescript-eslint/type-utils/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64: + /@typescript-eslint/type-utils/5.50.0_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-dcnXfZ6OGrNCO7E5UY/i0ktHb7Yx1fV6fnQGGrlnfDhilcs6n19eIRcvLBqx6OQkrPaFlDPk3OJ0WlzQfrV0bQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2674,9 +2708,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 - '@typescript-eslint/utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/utils': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu debug: 4.3.4 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq tsutils: 3.21.0_typescript@4.9.5 typescript: 4.9.5 transitivePeerDependencies: @@ -2709,7 +2743,7 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64: + /@typescript-eslint/utils/5.50.0_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2720,9 +2754,9 @@ packages: '@typescript-eslint/scope-manager': 5.50.0 '@typescript-eslint/types': 5.50.0 '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.33.0 + eslint-utils: 3.0.0_eslint@8.35.0 semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -2742,31 +2776,31 @@ packages: hasBin: true dev: true - /@vitest/expect/0.28.4: - resolution: {integrity: sha512-JqK0NZ4brjvOSL8hXAnIsfi+jxDF7rH/ZWCGCt0FAqRnVFc1hXsfwXksQvEnKqD84avRt3gmeXoK4tNbmkoVsQ==} + /@vitest/expect/0.29.1: + resolution: {integrity: sha512-VFt1u34D+/L4pqjLA8VGPdHbdF8dgjX9Nq573L9KG6/7MIAL9jmbEIKpXudmxjoTwcyczOXRyDuUWBQHZafjoA==} dependencies: - '@vitest/spy': 0.28.4 - '@vitest/utils': 0.28.4 + '@vitest/spy': 0.29.1 + '@vitest/utils': 0.29.1 chai: 4.3.7 dev: true - /@vitest/runner/0.28.4_22k4fsskoeieob62btkupydhfa: - resolution: {integrity: sha512-Q8UV6GjDvBSTfUoq0QXVCNpNOUrWu4P2qvRq7ssJWzn0+S0ojbVOxEjMt+8a32X6SdkhF8ak+2nkppsqV0JyNQ==} + /@vitest/runner/0.29.1_22k4fsskoeieob62btkupydhfa: + resolution: {integrity: sha512-VZ6D+kWpd/LVJjvxkt79OA29FUpyrI5L/EEwoBxH5m9KmKgs1QWNgobo/CGQtIWdifLQLvZdzYEK7Qj96w/ixQ==} dependencies: - '@vitest/utils': 0.28.4 + '@vitest/utils': 0.29.1 p-limit: 4.0.0 pathe: 1.1.0 dev: true patched: true - /@vitest/spy/0.28.4: - resolution: {integrity: sha512-8WuhfXLlvCXpNXEGJW6Gc+IKWI32435fQJLh43u70HnZ1otJOa2Cmg2Wy2Aym47ZnNCP4NolF+8cUPwd0MigKQ==} + /@vitest/spy/0.29.1: + resolution: {integrity: sha512-sRXXK44pPzaizpiZOIQP7YMhxIs80J/b6v1yR3SItpxG952c8tdA7n0O2j4OsVkjiO/ZDrjAYFrXL3gq6hLx6Q==} dependencies: tinyspy: 1.0.2 dev: true - /@vitest/utils/0.28.4: - resolution: {integrity: sha512-l2QztOLdc2LkR+w/lP52RGh8hW+Ul4KESmCAgVE8q737I7e7bQoAfkARKpkPJ4JQtGpwW4deqlj1732VZD7TFw==} + /@vitest/utils/0.29.1: + resolution: {integrity: sha512-6npOEpmyE6zPS2wsWb7yX5oDpp6WY++cC5BX6/qaaMhGC3ZlPd8BbTz3RtGPi1PfPerPvfs4KqS/JDOIaB6J3w==} dependencies: cli-truncate: 3.1.0 diff: 5.1.0 @@ -4590,7 +4624,16 @@ packages: peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 + dev: true + + /eslint-config-prettier/8.6.0_eslint@8.35.0: + resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq dev: true /eslint-import-resolver-node/0.3.7: @@ -4603,7 +4646,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/3.5.3_ohdts44xlqyeyrlje4qnefqeay: + /eslint-import-resolver-typescript/3.5.3_yckic57kx266ph64dhq6ozvb54: resolution: {integrity: sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -4612,8 +4655,8 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.12.0 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-plugin-import: 2.27.5_nowqz4jutkd4a233czbfk7jsgu + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-plugin-import: 2.27.5_xryalclnoqvokixzrgti522q2m get-tsconfig: 4.4.0 globby: 13.1.3 is-core-module: 2.11.0 @@ -4623,7 +4666,7 @@ packages: - supports-color dev: true - /eslint-mdx/2.0.5_eslint@8.33.0: + /eslint-mdx/2.0.5_eslint@8.35.0: resolution: {integrity: sha512-1ZzcJwJNfladtuK+uuG/MdC0idc1e3d1vCI2STOq/pLcJBGuao2biWh90vEh2M93zDiNoHJGUIU7UAxupiiHFw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: @@ -4632,7 +4675,7 @@ packages: acorn: 8.8.2 acorn-jsx: 5.3.2_acorn@8.8.2 cosmiconfig: 7.1.0 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq espree: 9.4.1 estree-util-visit: 1.2.1 remark-mdx: 2.2.1 @@ -4648,7 +4691,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_4lq3tljpmtdh3elqaianviuctu: + /eslint-module-utils/2.7.4_bgxoiowhkwa7lfe7an5kjo4eje: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -4669,39 +4712,39 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/parser': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu debug: 3.2.7 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.3_ohdts44xlqyeyrlje4qnefqeay + eslint-import-resolver-typescript: 3.5.3_yckic57kx266ph64dhq6ozvb54 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es/4.1.0_eslint@8.33.0: + /eslint-plugin-es/4.1.0_eslint@8.35.0: resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-eslint-plugin/5.0.7_cdhdgvmsbh3fbusrlxsl6de2he_eslint@8.33.0: + /eslint-plugin-eslint-plugin/5.0.7_cdhdgvmsbh3fbusrlxsl6de2he_eslint@8.35.0: resolution: {integrity: sha512-hcz4Bze1ECwv3Q/Bi/ZMZZNiuvI2YclNuxjnczkblQ0skrlPhdO83rSM7felf5n+7ZJOZi4GS8y8gNiRtvI0hA==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-utils: 3.0.0_eslint@8.33.0 + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-utils: 3.0.0_eslint@8.35.0 estraverse: 5.3.0 dev: true patched: true - /eslint-plugin-import/2.27.5_nowqz4jutkd4a233czbfk7jsgu: + /eslint-plugin-import/2.27.5_xryalclnoqvokixzrgti522q2m: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -4711,15 +4754,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/parser': 5.50.0_ycpbpc6yetojsgtrx3mwntkhsu array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_4lq3tljpmtdh3elqaianviuctu + eslint-module-utils: 2.7.4_bgxoiowhkwa7lfe7an5kjo4eje has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -4734,19 +4777,19 @@ packages: - supports-color dev: true - /eslint-plugin-jsonc/2.6.0_eslint@8.33.0: + /eslint-plugin-jsonc/2.6.0_eslint@8.35.0: resolution: {integrity: sha512-4bA9YTx58QaWalua1Q1b82zt7eZMB7i+ed8q8cKkbKP75ofOA2SXbtFyCSok7RY6jIXeCqQnKjN9If8zCgv6PA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-utils: 3.0.0_eslint@8.33.0 + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-utils: 3.0.0_eslint@8.35.0 jsonc-eslint-parser: 2.1.0 natural-compare: 1.4.0 dev: true - /eslint-plugin-jsx-a11y/6.7.1_eslint@8.33.0: + /eslint-plugin-jsx-a11y/6.7.1_eslint@8.35.0: resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: @@ -4761,7 +4804,7 @@ packages: axobject-query: 3.1.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -4771,27 +4814,27 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-markdown/3.0.0_eslint@8.33.0: + /eslint-plugin-markdown/3.0.0_eslint@8.35.0: resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-mdx/2.0.5_eslint@8.33.0: + /eslint-plugin-mdx/2.0.5_eslint@8.35.0: resolution: {integrity: sha512-j2xN97jSlc5IoH94rJTHqYMztl46+hHzyC8Zqjx+OI1Rvv33isyf8xSSBHN6f0z8IJmgPgGsb/fH90JbvKplXg==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8.0.0' dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-mdx: 2.0.5_eslint@8.33.0 - eslint-plugin-markdown: 3.0.0_eslint@8.33.0 + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-mdx: 2.0.5_eslint@8.35.0 + eslint-plugin-markdown: 3.0.0_eslint@8.35.0 remark-mdx: 2.2.1 remark-parse: 10.0.1 remark-stringify: 10.0.2 @@ -4802,16 +4845,16 @@ packages: - supports-color dev: true - /eslint-plugin-n/15.6.1_eslint@8.33.0: + /eslint-plugin-n/15.6.1_eslint@8.35.0: resolution: {integrity: sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' dependencies: builtins: 5.0.1 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq - eslint-plugin-es: 4.1.0_eslint@8.33.0 - eslint-utils: 3.0.0_eslint@8.33.0 + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint-plugin-es: 4.1.0_eslint@8.35.0 + eslint-utils: 3.0.0_eslint@8.35.0 ignore: 5.2.4 is-core-module: 2.11.0 minimatch: 3.1.2 @@ -4830,31 +4873,31 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 eslint-config-prettier: 8.6.0_eslint@8.33.0 prettier: 2.8.4 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-promise/6.1.1_eslint@8.33.0: + /eslint-plugin-promise/6.1.1_eslint@8.35.0: resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq dev: true - /eslint-plugin-react-hooks/4.6.0_eslint@8.33.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.35.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq dev: true - /eslint-plugin-react/7.32.2_eslint@8.33.0: + /eslint-plugin-react/7.32.2_eslint@8.35.0: resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} engines: {node: '>=4'} peerDependencies: @@ -4864,7 +4907,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -4878,13 +4921,13 @@ packages: string.prototype.matchall: 4.0.8 dev: true - /eslint-plugin-sonarjs/0.18.0_eslint@8.33.0: + /eslint-plugin-sonarjs/0.18.0_eslint@8.35.0: resolution: {integrity: sha512-DJ3osLnt6KFdT5e9ZuIDOjT5A6wUGSLeiJJT03lPgpdD+7CVWlYAw9Goe3bt7SmbFO3Xh89NOCZAuB9XA7bAUQ==} engines: {node: '>=14'} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq dev: true /eslint-plugin-tailwindcss/3.9.0: @@ -4897,17 +4940,17 @@ packages: postcss: 8.4.21 dev: true - /eslint-plugin-unicorn/45.0.2_eslint@8.33.0: + /eslint-plugin-unicorn/45.0.2_eslint@8.35.0: resolution: {integrity: sha512-Y0WUDXRyGDMcKLiwgL3zSMpHrXI00xmdyixEGIg90gHnj0PcHY4moNv3Ppje/kDivdAy5vUeUr7z211ImPv2gw==} engines: {node: '>=14.18'} peerDependencies: eslint: '>=8.28.0' dependencies: '@babel/helper-validator-identifier': 7.19.1 - '@eslint-community/eslint-utils': 4.1.2_eslint@8.33.0 + '@eslint-community/eslint-utils': 4.1.2_eslint@8.35.0 ci-info: 3.7.1 clean-regexp: 1.0.0 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq esquery: 1.4.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -4922,14 +4965,14 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-yml/1.4.0_eslint@8.33.0: + /eslint-plugin-yml/1.4.0_eslint@8.35.0: resolution: {integrity: sha512-vzggXNfPKa+arIaNUGoC3DPRZCxNty+xD/v9xOcE5D3Bj9SbgIrEobqVB35I8QxHd2YjL/dOS0xIIFmjAalwbw==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.1.0 @@ -4966,7 +5009,17 @@ packages: peerDependencies: eslint: '>=5' dependencies: - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 + eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-utils/3.0.0_eslint@8.35.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq eslint-visitor-keys: 2.1.0 dev: true @@ -4985,7 +5038,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq: + /eslint/8.33.0: resolution: {integrity: sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true @@ -5032,6 +5085,55 @@ packages: transitivePeerDependencies: - supports-color dev: true + + /eslint/8.35.0_v7lv2hbnxmm2b22qo3sob3rjvq: + resolution: {integrity: sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 2.0.0 + '@eslint/js': 8.35.0 + '@humanwhocodes/config-array': 0.11.8 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.35.0 + eslint-visitor-keys: 3.3.0 + espree: 9.4.1 + esquery: 1.4.2 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.20.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.4 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-sdsl: 4.3.0 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true patched: true /espree/9.4.1: @@ -5055,6 +5157,13 @@ packages: estraverse: 5.3.0 dev: true + /esquery/1.4.2: + resolution: {integrity: sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + /esrecurse/4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -9943,8 +10052,8 @@ packages: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.3 - /vite-node/0.28.4_@types+node@18.14.1: - resolution: {integrity: sha512-KM0Q0uSG/xHHKOJvVHc5xDBabgt0l70y7/lWTR7Q0pR5/MrYxadT+y32cJOE65FfjGmJgxpVEEY+69btJgcXOQ==} + /vite-node/0.29.1_@types+node@18.14.1: + resolution: {integrity: sha512-Ey9bTlQOQrCxQN0oJ7sTg+GrU4nTMLg44iKTFCKf31ry60csqQz4E+Q04hdWhwE4cTgpxUC+zEB1kHbf5jNkFA==} engines: {node: '>=v14.16.0'} hasBin: true dependencies: @@ -9953,8 +10062,6 @@ packages: mlly: 1.1.0 pathe: 1.1.0 picocolors: 1.0.0 - source-map: 0.6.1 - source-map-support: 0.5.21 vite: 4.1.1_@types+node@18.14.1 transitivePeerDependencies: - '@types/node' @@ -10000,8 +10107,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.28.4: - resolution: {integrity: sha512-sfWIy0AdlbyGRhunm+TLQEJrFH9XuRPdApfubsyLcDbCRrUX717BRQKInTgzEfyl2Ipi1HWoHB84Nqtcwxogcg==} + /vitest/0.29.1: + resolution: {integrity: sha512-iSy6d9VwsIn7pz5I8SjVwdTLDRGKNZCRJVzROwjt0O0cffoymKwazIZ2epyMpRGpeL5tsXAl1cjXiT7agTyVug==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -10025,10 +10132,10 @@ packages: '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 '@types/node': 18.14.1 - '@vitest/expect': 0.28.4 - '@vitest/runner': 0.28.4_22k4fsskoeieob62btkupydhfa - '@vitest/spy': 0.28.4 - '@vitest/utils': 0.28.4 + '@vitest/expect': 0.29.1 + '@vitest/runner': 0.29.1_22k4fsskoeieob62btkupydhfa + '@vitest/spy': 0.29.1 + '@vitest/utils': 0.29.1 acorn: 8.8.2 acorn-walk: 8.2.0 cac: 6.7.14 @@ -10044,7 +10151,7 @@ packages: tinypool: 0.3.1 tinyspy: 1.0.2 vite: 4.1.1_@types+node@18.14.1 - vite-node: 0.28.4_@types+node@18.14.1 + vite-node: 0.29.1_@types+node@18.14.1 why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -10070,7 +10177,7 @@ packages: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.33.0_v7lv2hbnxmm2b22qo3sob3rjvq + eslint: 8.33.0 eslint-scope: 7.1.1 eslint-visitor-keys: 3.3.0 espree: 9.4.1