Skip to content

Files

Latest commit

 

History

History
35 lines (23 loc) · 889 Bytes

no-dupe-style-properties.md

File metadata and controls

35 lines (23 loc) · 889 Bytes

Pattern: Duplicate style property

Issue: -

Description

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