@putout/plugin-apply-template-literals
🐊Putout plugin adds ability to apply template literals
Last updated 3 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-apply-template-literals 
SYNC missed versions from official npm registry.

@putout/plugin-apply-template-literals NPM version

Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates. Template literals are sometimes informally called template strings, because they are used most commonly for string interpolation (to create strings by doing substitution of placeholders

(c) MDN

????Putout plugin adds ability to apply template literals. Check out in ????Putout Editor.

Install

npm i @putout/plugin-apply-template-literals

Rule

{
    "rules": {
        "apply-template-literals": "on"
    }
}

❌ Example of incorrect code

const line = '("' + name + '")';

✅ Example of correct code

const line = `("${name}")`;

Comparison

Linter Rule Fix
???? Putout apply-template-literals
ESLint prefer-template

License

MIT

Current Tags

  • 5.0.0                                ...           latest (2 months ago)

9 Versions

  • 5.0.0                                ...           2 months ago
  • 4.2.0                                ...           a year ago
  • 4.1.0                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.0.0                                ...           2 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |