Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Website ESQuery doesn't work for typescript nodes #8896

Open
4 tasks done
entropitor opened this issue Apr 10, 2024 · 1 comment · May be fixed by #8917
Open
4 tasks done

Bug: Website ESQuery doesn't work for typescript nodes #8896

entropitor opened this issue Apr 10, 2024 · 1 comment · May be fixed by #8917
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working website: playground

Comments

@entropitor
Copy link

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

website

Playground Link

https://typescript-eslint.io/play/#ts=5.4.3&showAST=es&fileType=.tsx&esQuery=N4IgZglgNgLgpgJxALhAFQMpoJ4Ac4CCAdkQPYwCGMEpRIANCAM5xRwDGMpSyoMecFCAgATOEWqREDEADcKUAK6DUmHPmJlK1WiAC%2BeoA&code=FAYw9gdgzgLgBLATgLgTRBLCBzOBeOAcgBYAmQoA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false

Repro Code

const str: string = '42'

ESLint Config

module.exports = {
  parser: "@typescript-eslint/parser",
};

tsconfig

{
  "compilerOptions": {
  }
}

Expected Result

I expected to find the node when looking for it using the esquery query TSTypeAnnotation

Actual Result

I get an empty list

Additional Info

Probably we need to pass the visitorKeys as options to match (https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/website/src/components/ast/ASTViewer.tsx#L27)

Versions

/

@entropitor entropitor added bug Something isn't working triage Waiting for maintainers to take a look labels Apr 10, 2024
@bradzacher bradzacher added accepting prs Go ahead, send a pull request that resolves this issue website: playground and removed triage Waiting for maintainers to take a look labels Apr 10, 2024
@developer-bandi developer-bandi linked a pull request Apr 14, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working website: playground
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants