question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No lint errors or warnings shown in VSCode

See original GitHub issue

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    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

I’ve tried setting up graphql-eslint to lint TypeScript files according to the documentation. I have a .graphqlrc.yaml in my root folder, containing a configuration to access a remote schema. However, I don’t see any ESLint errors or warnings in VSCode when typing an invalid query in my TypeScript code (using gql from Apollo). Also, the ESLint extension output log is not showing any errors.

To Reproduce Steps to reproduce the behavior:

.eslintrc.json:

{
  "root": true,
  "ignorePatterns": ["**/*"],
  "plugins": ["@nrwl/nx"],
  "overrides": [
    {
      "files": ["*.ts"],
      "processor": "@graphql-eslint/graphql",
      "extends": ["plugin:prettier/recommended"]
    },
    {
      "files": ["*.graphql"],
      "extends": "plugin:@graphql-eslint/operations-recommended",
      "rules": {
        "prettier/prettier": "error"
      }
    },
...
 ]
} 

.graphqlrc.yaml:

schema:
  - <GraphQL endpoint>:
      headers:
        Authorization: Bearer <token>

Expected behavior

Lint errors should be shown when typing an invalid query.

Environment:

  • OS: macOS 12.6.1
  • @graphql-eslint/eslint-plugin: 3.11.2
  • Node.js: 16.14.0

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
B2o5Tcommented, Nov 14, 2022

"ignorePatterns": ["**/*"] because you ignore every file

1reaction
B2o5Tcommented, Nov 14, 2022

Sorry, your configuration seems over-complicated for me, different worked examples are located in the repository https://github.com/B2o5T/graphql-eslint/tree/master/examples

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show all warnings and errors in visual studio code
First the task run on the terminal! ... You can see a detailed report! You can use the click link on terminal feature...
Read more >
Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >
Linting errors are not shown in VSCode, though simple errors do
Linting errors are not shown, while "simple" syntax errors are shown. In the GIF below, you can see that the undefined variable message1...
Read more >
How To Highlight Errors And Warnings In VS Code - YouTube
Blog: http://www.shwetalodha.in/Medium: https://medium.com/@shweta-lodhaWatch out full Python playlist: ...
Read more >
VS Code tips — Quickly fix all linter errors in a file ... - YouTube
Today's VS Code extension tip: ESLint fix all actions Quickly fix all linter problems for a given ESLint rule or fix all auto...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found