Showing 258 of 258 total issues
Function error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
this.error = function (messageOrEvent, source, lineno, colno, error) {
Function watch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function watch (patterns, excludes, fileList, usePolling, emitter) {
Function BaseReporter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
const BaseReporter = function (formatError, reportSlow, useColors, browserConsoleLogOptions, adapter) {
Function main
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const main = async () => {
if (process.argv[2] === 'build') {
await bundleResourceToFile('client/main.js', 'static/karma.js')
await bundleResourceToFile('context/main.js', 'static/context.js')
} else if (process.argv[2] === 'check') {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function resolve
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function resolve (plugins, emitter) {
const modules = []
function requirePlugin (name) {
log.debug(`Loading plugin ${name}.`)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function onKeypress
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
onKeypress (key) {
if (!currentOptions || !key) {
return
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this function. Open
return strs.join('')
Avoid too many return
statements within this function. Open
return obj.outerHTML
Avoid too many return
statements within this function. Open
return obj.nodeValue
Avoid too many return
statements within this function. Open
return obj.outerHTML
Avoid too many return
statements within this function. Open
return next()
Avoid too many return
statements within this function. Open
return obj.toString()
Avoid too many return
statements within this function. Open
return obj.toString()
Avoid too many return
statements within this function. Open
return obj.nodeValue
Avoid too many return
statements within this function. Open
return 'Skipping stringify, no support for dom-serialize'
Avoid too many return
statements within this function. Open
return filesPromise.then((files) => {
common.setNoCacheHeaders(response)
response.writeHead(200)
response.end(JSON.stringify({
files: files.included.map((file) => filePathToUrlPath(file.path + '?' + file.sha, basePath, urlRoot, proxyPath))
Avoid too many return
statements within this function. Open
return obj.toString() + '\n' + obj.stack
Avoid too many return
statements within this function. Open
return obj.outerHTML
Avoid too many return
statements within this function. Open
return serveStaticFile(requestUrl, requestedRangeHeader, response)
Avoid too many return
statements within this function. Open
return filesPromise.then((files) => {
let fileServer
let requestedFileUrl
log.debug('custom files', customContextFile, customDebugFile, customClientContextFile)
if (isRequestingContextFile && customContextFile) {