New: add no-undefined rule (fixes #1020)

Fixes #1020.
It's not generally good practice. Please rephrase.