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

1.0.4 • Public • Published

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?


Readme

Keywords

Package Sidebar

Install

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

Weekly Downloads

981

Version

1.0.4

License

GPL-3.0

Unpacked Size

39.7 kB

Total Files

7

Last publish

Collaborators

  • zamiell