Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
prettier-plugin-html-no-eq-empty
Advanced tools
A prettier plugin to remove `=""` from HTML attributes
prettier-plugin-html-no-eq-empty
Remove empty HTML attributes (those pesky =""
s).
npm i -D prettier-plugin-html-no-eq-empty
Add the following to your prettier.config.js
:
export default {
// add the plugin
plugins: ['prettier-plugin-html-no-eq-empty'],
};
<!-- Before -->
<div data-bruh=""></div>
<!-- After -->
<div data-bruh></div>
Certain attributes are hard-coded to be excluded from being stripped:
alt
src
href
url
name
class
id
If you want to add or remove attributes from this list, you can either submit a PR, or just copy & paste the plugin into your project (it's one file!).
export default {
// add the plugin
plugins: ['./path/to/your/prettier-plugin-html-no-eq-empty.js'],
};
MIT
FAQs
A prettier plugin to remove `=""` from HTML attributes
We found that prettier-plugin-html-no-eq-empty demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.