
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@impjs/babel-plugin-transform-jsx-to-template-literals
Advanced tools
A Babel transform to transform JSX into template literals.
<h1 class={classnames}>{title}</h1>
// Becomes
`<h1 class=${classnames}>${title}</h1>`
Children are also handled too:
<article>
<h2>{title}</h2>
<div class="content">{content}</div>
</article>
// Becomes
`<article class="article">
<h2>${title}</h2>
<div class="article__content">${content}</div>
</article>`
If there is a spread, it'll be handled the following way:
<a href={href} {...props}>{content}</a>
// Becomes
`<a ${_attributes({href},props)}>${content}</a>`
// `_attributes` will be imported from a configurable package
// by default, just merge the two hashes
Imported components are run
const product = require('product');
<product {...productData}></product>
// Becomes
const product = require('product');
`${product(productData)}`
Children are passed to them as a children
property.
const card = require('card');
<card title={title}>
<div class="content"></div>
{() => {/* Some code */}}
</card>
// Becomes
`${card({
title,
children: [
`<div class="content"></div>`,
() => {/* Some code */}
]
)}`
FAQs
Template for NodeJS projects
We found that @impjs/babel-plugin-transform-jsx-to-template-literals demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.