style(popups): silence no-duplicate-selectors on intentional re-open#302
Open
jason10lee wants to merge 1 commit into
Open
style(popups): silence no-duplicate-selectors on intentional re-open#302jason10lee wants to merge 1 commit into
jason10lee wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates newspack-popups SCSS to explicitly annotate an intentional selector re-open so Stylelint’s no-duplicate-selectors rule doesn’t flag it, without changing the resulting compiled CSS.
Changes:
- Adds explanatory comments documenting why the
.newspack-lightbox/.newspack-popup__content-wrapperselectors are intentionally re-opened. - Wraps the deliberate duplicate-selector block in
/* stylelint-disable no-duplicate-selectors */and/* stylelint-enable no-duplicate-selectors */to keep linting strict elsewhere.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Annotates an intentional, documented duplicate selector in
newspack-popupsso it passes Stylelint'sno-duplicate-selectorsrule. Near the bottom ofsrc/view/style.scss, the.newspack-lightbox/.newspack-popup__content-wrapperselectors are deliberately re-opened (with an explanatory comment) to keep the wide/full-block alignment rules together with their rationale. This wraps that block in a scoped/* stylelint-disable no-duplicate-selectors */ … /* stylelint-enable */.Comment-only — no change to the compiled CSS.
This clears the last item in the repo-wide SCSS lint backlog, which is a prerequisite for the NPPM-290 Phase 2 CI SCSS gate (separate, follow-up PR).
Part of NPPM-290: Theme linting: PHP & CSS.
How to test the changes in this Pull Request:
pnpm --filter newspack-popups run lint:scss→ it passes (0 problems).main, the same command reports 2no-duplicate-selectorserrors insrc/view/style.scss.git diff main..HEAD -- plugins/newspack-popups/src/view/style.scssshows only added comment /stylelint-disable/stylelint-enablelines.Other information: