980 questions
0 votes
1 answer
69 views
Expected an assignment or function call and instead saw an expression. JS
I encountered a problem where JsHint throws the following error: "Expected an assignment or function call and instead saw an expression." on line: const OBJECT_PROTOTYPE_L = Object....
0 votes
1 answer
76 views
Why does jshint warn of calling functions from a function declared within a loop?
The following code function foo () {} let data = []; for (let x of data) { let bar = function () { foo (); }; } causes this warning in jshint Functions declared within loops referencing ...
0 votes
2 answers
233 views
ES6 'async' not defined or ES9 'arrow function not defined
I am using JSHint in Eclipse. When I configure for "esversion": 6, the arrow function warnings go away, but instead I get async and await warnings. When I set esversion to 8 or 9, the ...
1 vote
1 answer
171 views
Use JSHint in python
I have bunch of JavaScript functions, all loaded in memory and I need to validate their syntax before I write them down in .js files. The code that I have is in python and need to check the validity ...
0 votes
3 answers
124 views
Functions declared within loops referencing an outer scoped variable may lead to confusing
This is a jshint warning question.How can I solve this problem? var comment_btn=document.querySelector('.comment_button'); var comment_ul=document.querySelector('.comment_ul'); var comment_text=...
2 votes
3 answers
2k views
Why is Visual Studio Code recognizing my function as a constructor function?
Description of Issue I was reviewing my code for one of my projects when I noticed that one of my function's name is coloured green while all of the other functions are yellow. When I hover over the ...
0 votes
0 answers
99 views
Eclipse JSHint plugin installed but not working
I use 2018-09 (4.9) x86 and have downloaded 0.10.1 through Eclipse Marketplace. It is present in both list of installed software and p2 -> pool -> plugins folder but not appears in Project -> ...
0 votes
1 answer
129 views
How to suppress jshint W030 warning on "use strict" statement in VSCode?
I use jshint extension in VSCode. Even for the simplest JS file like this { "use strict"; let a = "Hello world!"; console.log(a); } I get the warning: Expected an ...
0 votes
1 answer
3k views
Failed to resolve module specifier
I`m only starting my JS journey and I will be really grateful if you help me to receive data using the JS. I found that info on the alcor exchange site that is the exchange site for wax (gaming crypto ...
2 votes
0 answers
64 views
vscode jshint error displaying in terminal
I'm getting this error in vscode. my os is windows 10. I'm using nodejs with express. I thought nodejs is not a problem. when I open my vscode, suddenly open the terminal and throw this error. I don't ...
0 votes
1 answer
29 views
Is there a way to set the "exported" option in .jshintrc (specifically for p5.js functions)?
We are using a cloud-based IDE to teach javascript programming to first-time coders. This IDE using jshint for linting, and allows us to override options via .jshintrc. We are using the p5.js library ...
0 votes
0 answers
141 views
How to configure JSHint to catch TypeErrors as in a browser console?
I am working on a custom editor which uses Monaco editor to accept the user snippets (pre-defined in JS lang) and I am using JSHint to evaluate their validity before submitting it to the backend. ...
-1 votes
2 answers
4k views
Connection to server got closed. Server will restart. events.js:292 errno: -4058,code: 'ENOENT'
could somebody help me handle this issue? Explain to me why it happens, please. If some more data is needed, just ask. thank you. events.js:292 throw er; // Unhandled 'error' event ^ ...
1 vote
1 answer
298 views
Detect old Internet explorer Javascript functions ( < ES6)
There is a web online, library or something to detect old IE functions that are not compatible with Chrome/Firefox or just ES6? Like: document.all, event.returnValue, etc JsHint/Jslint are not ...
-1 votes
1 answer
129 views
How to use jsHint to extract code metrics in the CLI report?
I am trying to get code metrics from jshint like on jshint.com: Metrics There is only one function in this file. It takes no arguments. This function contains 2 statements. Cyclomatic complexity ...