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 Lint Rule for CSS Conflict Detection #611

Closed
FlorianRappl opened this issue Jun 30, 2023 · 0 comments
Closed

Add Lint Rule for CSS Conflict Detection #611

FlorianRappl opened this issue Jun 30, 2023 · 0 comments
Assignees
Labels
cli Concerns the piral-cli application. enhancement New feature or request
Milestone

Comments

@FlorianRappl
Copy link
Contributor

New Feature Proposal

For more information, see the CONTRIBUTING guide.

Description

We should have a lint rule in the Piral CLI that can help pilet developers detect problems with their stylesheets. Quite often problems are not known and selectors are too generic to be used freely. When a selector does not only hit elements from the own micro frontend, but also from another micro frontend then we have a problem. In many cases such problems are not seen directly.

A lint rule may help.

Background

Originally, we planned to have this only in our commercial feed service (and we will have this one in there, too), but having the conflict potential also shown / indicated via the linter might be even more helpful in certain scenarios. Surely, only the feed service could detect that two selectors (independent of their complexity) are used in two different micro frontends, too.

Discussion

Right now we want to flag generic (i.e., simple - what is that?) CSS classes, element selectors, and universal selectors. Depending on how generic these are (and how they are used) they'll get a penalty point. A stylesheet with sufficient penalty points is red, otherwise it might be yellow or green (but these levels could be self-determined).

@FlorianRappl FlorianRappl added enhancement New feature or request cli Concerns the piral-cli application. labels Jun 30, 2023
@FlorianRappl FlorianRappl added this to the 1.1.0 milestone Jun 30, 2023
@FlorianRappl FlorianRappl added the in-review The item is currently being reviewed. label Jul 1, 2023
@FlorianRappl FlorianRappl self-assigned this Jul 9, 2023
@FlorianRappl FlorianRappl added in-implementation The item is currently being implemented. in-review The item is currently being reviewed. and removed in-review The item is currently being reviewed. in-implementation The item is currently being implemented. labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Concerns the piral-cli application. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant