Skip to content

Setting up eslint with typescript and pnpm inside a monorepo #868

Answered by dimaMachina
ivandotv asked this question in Q&A
Discussion options

You must be logged in to vote

You need to load schema or operations only either with graphql-config or via parserOptions option in your ESLint config.
Currenly you specify schema: './*.graphql' in your graphql.config.js file BUT also schema: './src/user.graphql' in your parserOptions option.
So your receive an error:

/Users/dimitri/Downloads/graphql-eslint-issue-main/server/src/user.graphql
  0:0  error  Parsing error: Unable to find any GraphQL type definitions for the following pointers:
        
          - ./*.graphql

Because graphql-eslint firstly search graphql-config file in your project. And he found a specified schema in graphql.config.js file that is WRONG.

Steps to solve it (choose only 1):

  • change matching…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@ivandotv
Comment options

@ivandotv
Comment options

@dimaMachina
Comment options

@ivandotv
Comment options

@dimaMachina
Comment options

Answer selected by ivandotv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants