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: [no-useless-template-literals] Missing report for Infinity and NaN #8294

Closed
4 tasks done
StyleShit opened this issue Jan 23, 2024 · 0 comments · Fixed by #8295
Closed
4 tasks done

Bug: [no-useless-template-literals] Missing report for Infinity and NaN #8294

StyleShit opened this issue Jan 23, 2024 · 0 comments · Fixed by #8295
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@StyleShit
Copy link
Contributor

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.

Playground Link

https://typescript-eslint.io/play/#ts=5.3.3&showAST=es&fileType=.ts&code=AYEg3gkgdgZgllOAXAngX2AbgFCjAOQEN8NMg&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tmUSWWS18iALbF4AQ2G1Gw6BPioMkRNGgdokcGAC%2BIHUA&tsconfig=&tokens=false

Repro Code

`${Infinity}`;
`${NaN}`;

ESLint Config

module.exports = {
  parser: "@typescript-eslint/parser",
  rules: {
    "@typescript-eslint/no-useless-template-literals": ["error"],
  },
};

tsconfig

{
  "compilerOptions": {
    // ...
  }
}

Expected Result

Report on the nodes and suggest a fix

Actual Result

There is no report

Additional Info

Inspired by #8284 that made me curious 😅

@StyleShit StyleShit added bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jan 23, 2024
StyleShit added a commit to StyleShit/typescript-eslint that referenced this issue Jan 23, 2024
StyleShit added a commit to StyleShit/typescript-eslint that referenced this issue Jan 23, 2024
@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for maintainers to take a look labels Jan 24, 2024
JoshuaKGoldberg pushed a commit that referenced this issue Jan 29, 2024
…NaN (#8295)

* fix(eslint-plugin): [no-useless-template-literals] report Infinity & NaN

Closes #8294

* remove unnecessary tests
danvk pushed a commit to danvk/typescript-eslint that referenced this issue Feb 4, 2024
…NaN (typescript-eslint#8295)

* fix(eslint-plugin): [no-useless-template-literals] report Infinity & NaN

Closes typescript-eslint#8294

* remove unnecessary tests
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants