You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please make sure the graphql-eslint version under package.json matches yours.
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
Eslint report this error in a functional graphql-config configuraiton.
TypeError: [graphql-eslint] Error while preprocessing "packages/front-lib/schema/schema.graphql" file
Provided file type must be one of .js, .mjs, .cjs, .jsx, .ts, .mts, .cts, .tsx, .flow, .flow.js, .flow.jsx, .vue, .svelte
at extractExtension (file:///home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@graphql-tools/graphql-tag-pluck/esm/index.js:98:19)
at gqlPluckFromCodeStringSync (file:///home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@graphql-tools/graphql-tag-pluck/esm/index.js:70:21)
at preprocess (file:///home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]/node_modules/@graphql-eslint/eslint-plugin/esm/processor.js:42:23)
at Linter._verifyWithFlatConfigArrayAndProcessor (/home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1494:22)
at Linter._verifyWithFlatConfigArray (/home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1863:25)
at Linter.verify (/home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1448:65)
at Linter.verifyAndFix (/home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:2083:29)
at verifyText (/home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/flat-eslint.js:475:48)
at FlatESLint.lintText (/home/charles/Workspaces/fx-front-dev/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/flat-eslint.js:954:26)
at async /home/charles/.vscode-server/extensions/dbaeumer.vscode-eslint-2.4.2/server/out/eslintServer.js:1:24852
seems like you did the setup of GraphQL ESLint's processor on .graphql files, the processor should be set only on .js/.jsx/.ts/.tsx/.svelte/.vue/.astro files and not on .graphql
Closing for now, feel free to reply if you still need help
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
Eslint report this error in a functional graphql-config configuraiton.
To Reproduce Steps to reproduce the behavior:
my configuration file like:
When lint
packages/front-lib/schema/schema.grapql
, the error will be reported. But I have another project config, like:when I edit and save all graphql file in
packages/data-api/schema/
directory, there is no error reported. This is weird.Expected behavior
Treat this file as
graphql
and lint it.Environment:
@graphql-eslint/eslint-plugin
: 3.20.1Additional context
The text was updated successfully, but these errors were encountered: