validate configuration
FND opened this issue · comments
FND commented
Detecting typos and similar issues might save users from arduous rabbit holes (cf. faucet-pipeline/faucet-pipeline-sass#62). A recent example was the erroneous use of "exnext" causing significant confusion.
declepticon seems like an acceptable option for this:
import { validate, validators } from "declepticon";
validate(bundleConfig, {
source: validators.nonBlankString
}, {
onError(message) {
throw new Error(message);
}
});