I managed to get a pull request accepted by flycheck to have a
variable to specify include paths for dmd so that the dmd runs
made by flycheck include all of the directories it needs to
properly highlight errors.
I wrote the elisp in the repository above to read package.json
and fill in that variable automatically. That way any project
with dub dependencies has automatic error checking as you type!
It'll probably need some using in real life and bug discovery
before it's solid, which is why I haven't tried adding it as a
package to marmalade or melpa yet.