# svelte/no-dupe-use-directives
disallow duplicate
use:
directives
# 📖 Rule Details
We can define any number of use:
directive with the same action, but duplicate directives with the exact same action and expression are probably a mistake.
This rule reports reports use:
directives with exactly the same action and expression.
<script>
/* eslint svelte/no-dupe-use-directives: "error" */
</script>
<!-- ✓ GOOD -->
<div use:clickOutside use:clickOutside={param} />
<div use:clickOutside={foo} use:clickOutside={bar} />
<!-- ✗ BAD -->
<div This `use:clickOutside` directive is the same and duplicate directives in L10. (svelte/no-dupe-use-directives)use:clickOutsideThis `use:clickOutside` directive is the same and duplicate directives in L10. (svelte/no-dupe-use-directives) use:clickOutside />
<div This `use:clickOutside` directive is the same and duplicate directives in L11. (svelte/no-dupe-use-directives)use:clickOutside={param}This `use:clickOutside` directive is the same and duplicate directives in L11. (svelte/no-dupe-use-directives) use:clickOutside={param} />
# 🔧 Options
Nothing.
# 🚀 Version
This rule was introduced in eslint-plugin-svelte v2.14.0