
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
babel-plugin-remove-data-test-id-attribute
Advanced tools
removes data-test-id attributes from jsx html elements. To be used for production builds.
Removes data-test-id
attribute from jsx html elements.
The data-test-id
is normally added for testing as a helper attribute to quickly grab an element by id and simualte events or do other stuff. The data-test-id
not required in the production builds and should be removed in production builds.
Usage -
$ npm i -D babel-plugin-remove-data-test-id-attribute
In your .babelrc file, or whereever you setup babel preferences, add the plugin to the plugins array, inside the production environment -
{
"env": {
"production": {
"plugins": ["babel-plugin-remove-data-test-id-attribute" ]
}
}
}
E.g. - If your jsx code looks like this
<div data-id="pqr" data-test-id='abc'>
abc
<p>para</p>
<Custom data-test-id='blah' />
</div>
When the code is passed through this plugin, it will change to -
<div data-id="pqr">
abc
<p>para</p>
<Custom />
</div>
FAQs
removes data-test-id attributes from jsx html elements. To be used for production builds.
We found that babel-plugin-remove-data-test-id-attribute 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.