Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate configuration #80

Open
FND opened this issue Nov 24, 2018 · 0 comments
Open

validate configuration #80

FND opened this issue Nov 24, 2018 · 0 comments

Comments

@FND
Copy link
Contributor

FND commented Nov 24, 2018

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);
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant