svelte icon indicating copy to clipboard operation
svelte copied to clipboard

Allow disabling warning about props which look like directives

Open farfromrefug opened this issue 2 years ago • 2 comments

Would be nice too have a way to disable that specific warning. In svelte-native we use prop: and ios: and android:. Maybe there could even be a way to define which props would be allowed without warning

farfromrefug avatar Jun 30 '23 11:06 farfromrefug

The original idea was to make this a warning in Svelte 4 and then an error in Svelte 5 (so that we could it being technically a breaking change whenever we added a new directive to the language). Maybe when we do make it an error, we could also add a compiler option that lets people opt in to a less-safe mode where these kinds of attributes are allowed.

Conduitry avatar Jun 30 '23 11:06 Conduitry

@Conduitry Thanks for explaining. yes it could be a compiler option. Would be even nicer to allow only some. Right now on: is already accepted and gives no warning. I would like for us in svelte-native to be able to add some and still keep warning for others. BTW would love to already have a way to do it now and prevent warnings. It gives really messy output.

farfromrefug avatar Jul 01 '23 12:07 farfromrefug