sveltejs/eslint-plugin-svelte
Add rule: warn if entire attribute value is placed in es6 template literal
已关闭
#893 创建于 2024年10月29日
enhancementhelp wantednew rule
仓库指标
- 星标
- (400 个星标)
- PR 合并指标
- (平均合并 3天 5小时) (30 天内合并 6 个 PR)
描述
Motivation
some developers (and ai, too!) will write attributes in jsx style. eg <a href={`https://example.com${path}`}>link</a>.
in idiomatic svelte, this should be <a href="https://example.com{path}">link</a>
Description
warn on attr={``}
Examples
<script>
</script>
<!-- ✓ GOOD -->
<Foo attr="foo${bar}" />
<!-- ✗ BAD -->
<Foo attr={`foo${bar}`} />
Additional comments
No response