Skip to content

fix(eslint-config): lint GraphQL in templates and parse .graphql files - #56

Merged
matejchalk merged 1 commit into
code-pushup:mainfrom
93maty:fix/graphql-processor-and-parser
Nov 3, 2026
Merged

matejchalk merged 1 commit into
code-pushup:mainfrom
93maty:fix/graphql-processor-and-parser

Conversation

@93maty

@93maty 93maty commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Fixes a bug with graphql config never linting anything.

Causes:

  1. The code-pushup/graphql/node-files-processor entry (files **/*.ts, **/*.js) was nested in the extends of the config scoped to **/*.graphql. defineConfig intersects a parent's files with its extended entries', so the processor ended up requiring a file to match both **/*.graphql and **/*.ts, which never happens. gql tagged templates in TS/JS files were not extracted.
  2. With @graphql-eslint/eslint-plugin v4 the flat/* configs carry only rules, so .graphql files had no parser and failed with Parsing error: Unexpected token … under espree.

@matejchalk matejchalk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. 🙂

@matejchalk
matejchalk merged commit ba5eba8 into code-pushup:main Nov 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants