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

Improve primer/no-override to match classes, better reporting #37

Merged
merged 3 commits into from Sep 9, 2019

Conversation

shawnbot
Copy link
Contributor

@shawnbot shawnbot commented Sep 5, 2019

This updates our primer/no-overrides rule to focus on class selectors specifically, as including non-class selectors produces a lot of false positives in (cough) some large custom CSS codebases. I've also reworked the error messages so that they're easier to read, and so that you can sort the output to more easily find what you're looking for:

#                                          ⇣ this is the full selector in violation".text-gray" should not be overridden in ".foo .text-gray" (found in utilities)
# ⇡ this is the immutable part                      this is the bundle ⇡

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍 Left a couple comments but nothing blocking.

plugins/no-override.js Outdated Show resolved Hide resolved
plugins/no-override.js Show resolved Hide resolved
Co-Authored-By: Cole Bemis <colebemis@github.com>
@shawnbot shawnbot changed the base branch from master to release-8.0.0 September 9, 2019 18:30
@shawnbot shawnbot merged commit e59866d into release-8.0.0 Sep 9, 2019
@shawnbot shawnbot deleted the no-override-classes branch September 9, 2019 18:31
@shawnbot shawnbot mentioned this pull request Sep 9, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants