Best practice
javascript-alert
javascript-alert
found alert() call; should this be in production code?
javascript-debugger
javascript-debugger
found debugger call; should this be in production code?
javascript-confirm
javascript-confirm
found confirm() call; should this be in production code?
javascript-prompt
javascript-prompt
found prompt() call; should this be in production code?
zlib-async-loop
zlib-async-loop
Creating and using a large number of zlib objects simultaneously can cause significant memory fragmentation. It is strongly recommended that the results of compression operations be cached or made synchronous to avoid duplication of effort.
assigned-undefined
assigned-undefined
undefined
is not a reserved keyword in Javascript, so this is “valid” Javascript but highly confusing and likely to result in bugs.
lazy-load-module
lazy-load-module
Lazy loading can complicate code bundling if care is not taken, also require
s are run synchronously by Node.js. If they are called from within a function, it may block other requests from being handled at a more critical time. The best practice is to require
modules at the beginning of each file, before and outside of any functions.