Copy link to clipboard
Copied
I have 3 functions in a .js file that I absolutely use in my HTML. However, I get the errors below. Is it because the functions are not called within the .js file? How can I suppress the errors?
Yes, this will usually happen if you have an onclick event etc set in the actual html rather than the javascript block itself.
In my experience all web editors report these as errors. Linting is only really meant for guidance. You should not expect it to work 100%
Copy link to clipboard
Copied
Yes, this will usually happen if you have an onclick event etc set in the actual html rather than the javascript block itself.
In my experience all web editors report these as errors. Linting is only really meant for guidance. You should not expect it to work 100%
Copy link to clipboard
Copied
If you know your code is valid, and you just want DW to shut up about the non-error, you can go to...
Site > Manage Sites> click your site > Edit (pencil icon) > Advanced Settings > JS Lint (bottom option) > click Edit Configuration File > scroll down to "no-unused-vars" and change "error" to "off"
Save and close the .eslintrc.js file