# svelte/no-dupe-style-properties
disallow duplicate style properties
- ⚙️ This rule is included in
"plugin:svelte/recommended"
.
# 📖 Rule Details
This rule reports duplicate style properties.
<script>
/* eslint svelte/no-dupe-style-properties: "error" */
let red = 'red';
</script>
<!-- ✓ GOOD -->
<div style="background: green; background-color: {red};">...</div>
<div style:background="green" style="background-color: {red}">...</div>
<!-- ✗ BAD -->
<div style="Duplicate property 'background'. (svelte/no-dupe-style-properties)backgroundDuplicate property 'background'. (svelte/no-dupe-style-properties): green; background: {red};">...</div>
<div style:Duplicate property 'background'. (svelte/no-dupe-style-properties)backgroundDuplicate property 'background'. (svelte/no-dupe-style-properties)="green" style="background: {red}">...</div>
# 🔧 Options
Nothing.
# 🚀 Version
This rule was introduced in eslint-plugin-svelte v0.31.0