🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

prettier-plugin-html-inline-force-semi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-html-inline-force-semi

Prettier plugin to ensure HTML inline attributes (style, functions) end with a semicolon

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

prettier-plugin-html-inline-force-semi

Should work in HTML and Angular HTML parsers

Installation

Run: npm install prettier-plugin-html-inline-force-semi --save-dev

Add to plugins in prettier options, e.g: { "plugins": ["prettier-plugin-html-inline-force-semi"] }

Prettier options:

Values

htmlForceSemiOn = "style" | "all" | "angularEvent" | "never"

  • default = "style"

Example config

{
  ...,
  "plugins": ["prettier-plugin-html-inline-force-semi"],
  "htmlForceSemiOn": "style"
}

Examples

style (including all)

Before

<div style="text-align: right; margin: 6px 0">Hello World</div>

After

<div style="text-align: right; margin: 6px 0;">Hello World</div>

angularEvent (including all)

Before

<button (click)="myFunction()">Hello World</button>

After

<button (click)="myFunction();">Hello World</button>

Keywords

prettier

FAQs

Package last updated on 09 Jul 2024

Did you know?

Socket

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