problem in vs code
guys i have installed node js but now my vs code keeps spamming me with errors how can i fix it
23 Replies
what's the error?
man all my codes are not working my vs code is displaying errors in things like don't write button or use backdrop filter
Share the actual text of the errors please
Or screenshots if you can't copy the text
like this one
or this one
Those are warnings that you should solve by changing your code so that it doesn't have errors. Buttons should have type attributes, and that backdrop filter won't work in Firefox
It has nothing to do with node
but i am using opera
and this errors showed only when i installed it
Yes, but if someone using Firefox visits your site, it won't work properly. Generally you write your website for others to use
Maybe the plugin that shows those warnings requires node? They're not errors perse though, it's all working as intended
but all my codes that i open in vc code are giving me random problems
They're not random, those are legitimate issues with your code that you should fix
man look at this
this is not normal
Yes it is, your code just needs some tweaking
That label isn't used correctly. It needs a for attribute pointing at the input
All the errors you've shown are vs code pointing to the issues in your code. They even include tips on how to fix them and a link to the mdn article explaining what is wrong.
idk every code that was right now is showing problem
The thing is, that wasn't right, vs code just didn't warn you before.
Normally those would come up as you're writing your code, and they're not a big deal to fix. It seems like something made them not appear before, and now you'll have a bunch of small issues to correct. Next time you write more fresh code, you'll know what to do and you'll have fewer errors.
i see
can i disable this?
Probably, but I wouldn't recommend it. All the things it's pointing out are legitimate concerns that impact usability and accessibility
okay
thanks
you are also kinda misusing divs and links
the backdrop-filter could be handled with an autoprefixer
this is a very legitimate error, as you are using a button without a type, which will default to
submit
:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#typeMDN Web Docs
: The Button element - HTML: HyperText Markup Language | MDN
The HTML element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it then performs an action, such as submitting a form or opening a dialog.
so, your print button is actually submitting the form at the same time
im 300% sure that that isnt what you want from a print button
another problem in this is that you are setting values by default, instead of using the placeholder attribute
which is the other 1/3 of the warning
the way you have it now will defeat any validation you might have, and will allow sending the default data
also, its super annoying to have to clean up garbage values, both for you and for the user
the tool may be overbearing and annoying, but you do have serious issues in the code and the tool is warning you about some of them
you can see the extension that is showing you all these very legitimate errors, and you can decide to change the settings or delete it, but you will lose on valuable learning
i might install the microsoft edge tools extension, to try it out, after seeing the mistakes it caught