#4448·tools

`quoteStyle` is ignored for `noUnusedTemplateLiteral` suggestion

Author: garymathewsCreated May 9, 2023Updated Jul 31, 2023
LabelsenhancementA-LSP

Environment information

block
CLI:
  Version:                      12.0.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v19.8.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/1.22.19"

Rome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true

Workspace:
  Open Documents:               0

What happened?

json
"javascript": {
	"formatter": {
		"quoteStyle": "single"
	}
}
✖ Do not use template literals if interpolation and special-character handling are not needed.

    328 │ 		// Something bad happened, throw exception.
  > 329 │ 		throw new ServerError(`Could not update module.`);
        │ 		                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    330 │ 	}
    331 │

  ℹ Suggested fix: Replace with string literal

    329 │ → → throw·new·ServerError("Could·not·update·module.");

Expected result

noUnusedTemplateLiteral suggestion should use the specified quoteStyle

Code of Conduct

  • I agree to follow Rome's Code of Conduct