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

Add runtime validation to the options of our integrations #2739

Open
barak007 opened this issue Sep 27, 2022 · 2 comments
Open

Add runtime validation to the options of our integrations #2739

barak007 opened this issue Sep 27, 2022 · 2 comments
Labels
good first issue Good place to start contributing to Stylable integration Bundler, test-runner and node

Comments

@barak007
Copy link
Collaborator

Proposal Description

Add runtime check for the validity of options for our integrations.

Additional Context

Example:
When you upgrade stylable from 3 to 4, and don't change the options for our webpack plugin you get silent fail.

@barak007 barak007 added triage Awaiting issue processing integration Bundler, test-runner and node tooling CLI, stylable-scripts boilerplate good first issue Good place to start contributing to Stylable and removed tooling CLI, stylable-scripts boilerplate labels Sep 27, 2022
@idoros idoros removed the triage Awaiting issue processing label Oct 25, 2022
@Cxxshyy
Copy link

Cxxshyy commented Jan 20, 2023

can i get a little guidance on how this could be implemented for example the files that could handle this etc

@idoros
Copy link
Collaborator

idoros commented Jan 20, 2023

First of all thank you for taking an interest in Stylable.

There are several integrations that can use this validation. The CLI tools (stc, stc-format, stc-codmod) already have this functionality through yargs strict.

The integrations that can use this are @stylable/webpack-plugin and @stylable/rollup-plugin.
Both projects can be validated in their plugin constructor:

And both projects have similar tests, where you setup a fixture folder and spec to check it (for rollup: fixtures and specs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good place to start contributing to Stylable integration Bundler, test-runner and node
Projects
None yet
Development

No branches or pull requests

3 participants