Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docs: Clarify purpose of no-useless-template-literal (or rename?) #8544

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
@kirkwaiblinger

Description

@kirkwaiblinger

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

Reading the docs at face value, I would consider it a bug that the example

constuseless=`I am a useless template literal that could be converted to an ordinary string`;

is not flagged by no-useless-template-literal. (If it actually should be flagged, feel free to convert this to a bug!)

The way I understand it though, the rule as-is is really going after useless templateinterpolations. I think this strongly needs clarification in the docs.

Furthermore, I think that the quotes rule (https://typescript-eslint.io/rules/quotes/), whichcan be used to prohibit useless template literals, and the no-useless-template-literal rule docs ought to contain links to each other to help a user figure out which one to use, depending on what the goal is. (I'm currently setting this up at my day job and getting confused over which one to use 😆)

Affected URL(s)

https://typescript-eslint.io/rules/no-useless-template-literals/
https://typescript-eslint.io/rules/quotes/

cc@StyleShit

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp