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 the configuration given to lit-analyzer #65

Open
runem opened this issue Nov 9, 2019 · 0 comments
Open

Validate the configuration given to lit-analyzer #65

runem opened this issue Nov 9, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@runem
Copy link
Owner

runem commented Nov 9, 2019

The configuration given to lit-analyzer is not validated as of now.

First of all, I think the CLI should throw on invalid values, but ts-lit-plugin should only log warnings (no reason to crash when running in the IDE).

Therefore, I think that we should implement one of these solutions:
a. export a validateConfig function that validates the raw, partial config.
b. extend makeConfig with an option to assert values (perhaps a callback that is called on invalid config values).

I also think makeConfig should properly fall back to default values when encountering an invalid value (which it doesn't do for all attributes right now).

@runem runem added the enhancement New feature or request label Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant