Open piranna opened 9 years ago
While I like that organization myself, I'm not sure how valuable it is in itself. For example, "kwalitee" would fail because it has to do require() based on programmatic names for modules. Do you have some esprima style code that'd work for this sort of detection?
Your use case is something that fails on browserify and need some hacks, so could be considered "bad code", or at least show a warning. This can be identified because require() argument is a variable and didn't solved to a constant when browserify/esprima was called.
Sure, but kwalitee isn't meant for the browser.
file
require()
s entries should be at the top of the page, maybe with interlazed with some variables definitions, but in the recomended order: Node.js build-ins, third-party modules, and last modules on the same project. This can be easily identified by the usage of relative paths on the requires.