eslint-plugin-no-template-curly-in-string-fix

v1.0.4
A replacement for the ESLint no-template-curly-in-string-fix rule that allows automatic fixing.
eslint eslintplugin

eslint-plugin-no-template-curly-in-string-fix

What is this?

This is a replacement for the ESLint no-template-curly-in-string rule that allows automatic fixing.


How do I use it?

  • npm install --save-dev eslint-plugin-no-template-curly-in-string-fix
  • Add "plugin:no-template-curly-in-string-fix/recommended" to the extends section of your .eslintrc.js file.

Why should I use this?

The ESLint no-template-curly-in-string rule will throw an error if you use "${foo}", complaining that you should convert it to ${foo}. This is a fantastic rule, as the use of the former is almost always a bug.

However, when using the --fix flag, ESLint will not automatically fix this for you, unlike most other rules. This is probably because ESLint does not want to break code where the programmer did this intentionally.

To get around this, use this plugin to make this rule automatically --fixable. Doing so will save you a ton of time.


What rules does this plugin provide?

It only provides one rule: "no-template-curly-in-string-fix/no-template-curly-in-string"


How did you make this?


npm i eslint-plugin-no-template-curly-in-string-fix

Metadata

Downloads

Maintainers