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
{{ message }}
Repository navigation
Support Oxlint via an Oxlint JavaScript plugin #2960
Is your feature request related to a problem? Please describe.
I would like to use @graphql-eslint/eslint-plugin rules in projects that are adopting Oxlint.
Currently, GraphQL-specific linting relies on ESLint. This works well, but teams that are moving part of their linting pipeline to Oxlint cannot reuse the existing GraphQL ESLint rules there. As a result, we either need to keep ESLint only for GraphQL linting or lose GraphQL-specific lint checks in the Oxlint workflow.
This creates friction for projects that want faster linting while still keeping GraphQL validation and best practices enforced.
Describe the solution you'd like
I would like @graphql-eslint/eslint-plugin to provide support for Oxlint.
My assumption is that this could be implemented using the Oxlint JavaScript plugin API, exposing GraphQL ESLint rules in a way that Oxlint can execute.
Ideally, the package would provide one of the following:
an Oxlint-compatible plugin entry point
a separate package such as @graphql-eslint/oxlint-plugin
documentation showing how to use GraphQL ESLint rules from Oxlint, if this is already possible
The goal is not necessarily to replace ESLint support, but to make GraphQL linting available for users who are adopting Oxlint.
Describe alternatives you've considered
The current alternative is to continue running ESLint in parallel with Oxlint, using ESLint only for GraphQL-related rules.
That works, but it has some downsides:
maintaining two linting tools in the same project
duplicated configuration and CI setup
slower linting compared with an Oxlint-first workflow
inconsistent developer experience between JavaScript/TypeScript linting and GraphQL linting
Another alternative is to disable GraphQL-specific linting when moving to Oxlint, but that would reduce safety and remove useful schema/query validation.
Additional context
Oxlint is increasingly being adopted as a fast linting tool for JavaScript and TypeScript projects.
GraphQL projects would benefit from being able to keep rules from @graphql-eslint/eslint-plugin while adopting Oxlint.
I understand that not all ESLint rule APIs may map directly to Oxlint. Even partial support for rules that can be implemented through the Oxlint JavaScript plugin API would be very helpful.
Reacted by Vitor Buzinaro, Yasuyuki Matsumoto, leniency, tomotomo, Aleksey and Adrian
As a stopgap while this is being considered upstream, I published a third-party plugin that runs @graphql-eslint/eslint-plugin rules inside oxlint through oxlint's JS-plugin API:
It doesn't reimplement any rules — @graphql-eslint/eslint-plugin and graphql are peer dependencies, so your installed version is what actually runs. The plugin provides the SourceCode/rule-runner surface the rules expect, extracts embedded GraphQL with the same graphql-tag-pluck-based extraction graphql-eslint itself uses, and maps diagnostics and fixes back onto host-file coordinates.
All 64 upstream rules are exposed as graphql/<same-name>, and all five flat configs are ported. Existing graphql.config.* / .graphqlrc.* files work unchanged.
Known limits, all documented in the README:
.graphql / .gql files are not linted. oxlint has no custom-parser support, so only GraphQL embedded in JS/TS is covered. Standalone documents still need ESLint + graphql-eslint alongside.
.vue / .svelte embedded GraphQL is not covered — this is upstream extraction behaviour (the .vue processor rejects the format outright; .svelte needs optional svelte2tsx/svelte), not an oxlint limitation.
GraphQL syntax errors surface as a plugin-provided graphql/parse-error rule, since oxlint has no fatal-parse channel for plugins.
Rule behaviour is diff-checked against real installed eslint + @graphql-eslint/eslint-plugin in CI (graphql-eslint's own documented rule examples run through both engines), currently 0 mismatches.
I'd still much prefer first-party support — a @graphql-eslint/oxlint-plugin package or an official entry point — and I'm happy to contribute this work upstream in whatever shape maintainers would want it. Sharing it here mainly so anyone hitting this issue has something usable in the meantime.
Activity
ya2s commentedon Aug 28, 2026
As a stopgap while this is being considered upstream, I published a third-party plugin that runs
@graphql-eslint/eslint-pluginrules inside oxlint through oxlint's JS-plugin API:It doesn't reimplement any rules —
@graphql-eslint/eslint-pluginandgraphqlare peer dependencies, so your installed version is what actually runs. The plugin provides theSourceCode/rule-runner surface the rules expect, extracts embedded GraphQL with the samegraphql-tag-pluck-based extraction graphql-eslint itself uses, and maps diagnostics and fixes back onto host-file coordinates.All 64 upstream rules are exposed as
graphql/<same-name>, and all five flat configs are ported. Existinggraphql.config.*/.graphqlrc.*files work unchanged.Known limits, all documented in the README:
.graphql/.gqlfiles are not linted. oxlint has no custom-parser support, so only GraphQL embedded in JS/TS is covered. Standalone documents still need ESLint + graphql-eslint alongside..vue/.svelteembedded GraphQL is not covered — this is upstream extraction behaviour (the.vueprocessor rejects the format outright;.svelteneeds optionalsvelte2tsx/svelte), not an oxlint limitation.graphql/parse-errorrule, since oxlint has no fatal-parse channel for plugins.Rule behaviour is diff-checked against real installed
eslint+@graphql-eslint/eslint-pluginin CI (graphql-eslint's own documented rule examples run through both engines), currently 0 mismatches.I'd still much prefer first-party support — a
@graphql-eslint/oxlint-pluginpackage or an official entry point — and I'm happy to contribute this work upstream in whatever shape maintainers would want it. Sharing it here mainly so anyone hitting this issue has something usable in the meantime.