You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using CSP, you often want to disallow inline styles (to not have style-src: 'unsafe-inline'), I'd like to add a rule that checks this automatically
Description
The rule would look for any directive producing inline styles and error on them.
Additionaly, using svelte transitions generates inline styles (although that may change in the future if/when svelte migrates to teh web animations - see sveltejs/svelte#6662), so this rule should probably ban using them altogether (gated with a configuration option probably?)
Examples
<!-- ✗ BAD -->
<divstyle="anything" />
<divstyle:anything={true} />
<divtransition:anything />
Additional comments
No response
The text was updated successfully, but these errors were encountered:
Motivation
When using CSP, you often want to disallow inline styles (to not have
style-src: 'unsafe-inline'
), I'd like to add a rule that checks this automaticallyDescription
The rule would look for any directive producing inline styles and error on them.
Additionaly, using svelte transitions generates inline styles (although that may change in the future if/when svelte migrates to teh web animations - see sveltejs/svelte#6662), so this rule should probably ban using them altogether (gated with a configuration option probably?)
Examples
Additional comments
No response
The text was updated successfully, but these errors were encountered: