Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.24 KB

no-dupe-style-properties.md

File metadata and controls

51 lines (34 loc) · 1.24 KB
pageClass sidebarDepth title description since
rule-details
0
svelte/no-dupe-style-properties
disallow duplicate style properties
v0.31.0

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="background: green; background: {red};">...</div>
<div style:background="green" style="background: {red}">...</div>

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-svelte v0.31.0

🔍 Implementation