Skip to content

VBC-908: long-inline-style

warning

Category: clean-code
Analysis: Regex (line by line)
File types: .html, .js, .ts, .tsx, .astro
Scope: source code only, ignoring anything inside strings and comments
Tags: clean-code css

What it reports

Overly long inline style attribute at line {line}. Move styles to a CSS file or component.

Flagged

html
<div style="display:flex;align-items:center;justify-content:space-between;padding:8px">x</div>

Not flagged

html
<div className="row">x</div>

Pattern

regex
style\s*=\s*['"].{50,}['"]

Released under the MIT License.