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.

Incompatibility with @typescript-eslint

See original GitHub issue

When we use the config @typescript-eslint/recommended-requiring-type-checking from typescript-eslint we have to set parserOptions.project.

It seems that eslint-mdx overwrites the parserOptions.project config because when we run eslint we get this error:

Error: Error while loading rule '@typescript-eslint/no-misused-promises': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
jackkronecommented, Nov 9, 2021

@JounQin Sure. I just figured it out, as indicated in https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-963837780

This is what my overrides array looks like in eslintrc:

  "overrides": [
    {
      "files": [".tsx", ".ts"],
      "extends": "plugin:@typescript-eslint/recommended-requiring-type-checking"
    },
    {
      "files": ["*.mdx"],
      "extends": "plugin:mdx/recommended"
    }
  ]

I’ve found that this is required if using the @typescript-eslint/parser and the @typescript-eslint/recommended-requiring-type-checking plugin

0reactions
JounQincommented, Nov 9, 2021

@jackkrone You’d better provide your reproduction instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

typescript-eslint/eslint-plugin@2.3.2: The engine "node" is ...
node. js - @typescript-eslint/eslint-plugin@2.3.2: The engine "node" is incompatible with this module - Stack Overflow. Stack Overflow for ...
Read more >
Using ESLint with TypeScript
In this lesson, we will learn how to use ESLint in a TypeScript project and how it is beneficial. Technical requirements.
Read more >
typescript-eslint
typescript -eslint enables ESLint to run on TypeScript code. It brings in the best of both tools to help you write the best...
Read more >
Linting in TypeScript using ESLint and Prettier - LogRocket Blog
Integrate Prettier with ESLint to automate type-checking in your TypeScript code and ensure that the code has no bugs.
Read more >
eslint-config-canonical - npm
Rule CN AB GG SD XO @babel/new‑cap ❌ 👻 👻 👻 👻 @babel/no‑invalid‑this 🚨 👻 👻 👻 👻 @babel/no‑unused‑expressions 🚨 👻 👻 👻 👻
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