Socket
Socket
Sign inDemoInstall

@putout/plugin-apply-template-literals

Package Overview
Dependencies
387
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @putout/plugin-apply-template-literals

🐊Putout plugin adds ability to apply template literals


Version published
Weekly downloads
3.6K
increased by5.81%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@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

LinterRuleFix
🐊 Putoutapply-template-literals
ESLintprefer-template

License

MIT

Keywords

FAQs

Last updated on 01 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc