-
Notifications
You must be signed in to change notification settings - Fork 39
chore(atomic): add script / CI job to validate light DOM styles in Lit components #6807
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a static analysis script and CI job to detect invalid :host CSS selectors in Lit components that use Light DOM (no Shadow DOM). The validation prevents a subtle bug where :host selectors in Light DOM components cause style leakage or misapplication since there's no shadow boundary.
Key changes:
- New validation script that recursively analyzes component files and imported styles for
:hostselectors in Light DOM components - CI workflow integration to run validation on every build
- npm script entry for local validation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/atomic/scripts/check-light-dom-host-selectors.mjs | New validation script that detects :host selectors in LightDomMixin and ItemSectionMixin components, including imported styles |
| packages/atomic/package.json | Adds validate:light-dom-styles npm script to run the validation |
| .github/workflows/ci.yml | Adds validate-light-dom-styles CI job that runs after build step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@fbeaudoincoveo I've opened a new pull request, #6811, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@fbeaudoincoveo I've opened a new pull request, #6812, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: fbeaudoincoveo <[email protected]>
…ts CI job (#6812) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: fbeaudoincoveo <[email protected]>
https://coveord.atlassian.net/browse/KIT-5334
#6806