Remove supress warnings
The code line console.warn = ... is causing an error in Firefox that interrupts the program's execution. In addition, I believe that it is not advisable to silence warnings from the framework or UI library when they are used as a sub-package.
Hey! Is there a way to silence this warnings now? This was added due to many complaints about the "unused prop" warnings. The console can be flooded by these.
Hey! Is there a way to silence this warnings now? This was added due to many complaints about the "unused prop" warnings. The console can be flooded by these.
@pablo-abc It is not wise to clear Svelte warnings. What if you miss a warning that helps you to fix a bug? I recommend that you keep it as is. You can always enable/disable warnings in browser console.
Second the change. Silently modifying globals is a sure way to cause a lot of pain. If it helps, all modern consoles have filters that can be used to tune out unwanted logs.
@aryzing Maintainer seems unresponsive. So, i have created and published fixed version to npm. See my comment here:
https://github.com/pablo-abc/svelte-markdown/issues/64#issuecomment-1454863643
Thank you @dogagenc. I'll take a look at your fork.
Fyi @pablo-abc, if you've got too much on your plate now, you may want to consider adding contributors to this repo. Seems that if this repo doesn't receive more attention, more forks may start to take off. Given this repo's popularity, seems we would best served by capturing further improvements here.
@pablo-abc suppressWarnings() appears to be killing our server, because you only undo the override in onMount i.e. on the client, so the server call-stack for console.warn just grows and grows 💥.
2023-11-27T11:20:41.244562118Z server-error-hook RangeError: Maximum call stack size exceeded
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3981:18)
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
2023-11-27T11:20:41.244590339Z at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
2023-11-27T11:20:41.244610389Z at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
2023-11-27T11:20:41.244616359Z at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5) {
FYI I opened a PR which is a bit less drastic than just suppressing all the warnings (which are truly annoying). I also noticed that even SvelteKit supresses warnings like this, so it seems fairly reasonable if done well.