I am using JSHint and I want to turn on cyclomatic complexity.
From JsHint homepage and JsHint Docs , JsHint seem to be able to measure it.
But after I ran this command jshint test.js
to test the below file
//test.js
$(document).ready(function() {
$("p").click(function() {
$(this).hide();
var x = 5
});
function main() {
return 'Hello, World!';
}
});
I only get the linting report (test.js: line 4, col 14, Missing semicolon., ...)
How can I do this?