← Back to Pull requests

chore(style): audit the stylelint config #20945

Closed
unknown closed this pull request without merging on Nov 20, 2026 16:19 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 13:00 UTC
Author

Audits .stylelintrc.json against stylelint-config-standard-scss and removes overrides that were inert, redundant or hiding fixable issues. Shipped CSS changes only in the box-sizing reset. Each commit passes npm run stylelint on its own.

  • c1aca3b0d replaces the inert BEM plugin with a class name pattern. plugin/selector-bem-pattern never ran: postcss-bem-linter only lints CSS after a /* @define Component / comment or in files matching implicitComponents (README), and neither is set. A selector-class-pattern regex now enforces kebab-case BEM with one element and one modifier, the depth sass-lint's bem-depth allowed in #2294. It also rejects js- and -js- classes, following the Airbnb guide's JavaScript hooks rule that frontend.md adopts. stylelint-selector-bem-pattern and its transitive packages leave the lock file.

  • e47b19945 drops overrides the preset already covers: no-descending-specificity, scss/no-global-function-names, the Font Awesome family exception made obsolete by #19242, and _reset.scss in ignoreFiles. It restores the preset's first-nested and stylelint-commands handling on comment-empty-line-before, which makes one disable comment needless.

  • c4d084d84 turns on the preset's blank-line and comment-spacing rules and applies stylelint --fix (36 stylesheets). rtlcss directives become / rtl:ignore /.

  • 5bdd1d62b drops the -webkit-/-moz- box-sizing prefixes and lints the reset, emptying ignoreFiles. Unprefixed box-sizing works from Chrome 10, Firefox 29, Safari 5.1 and Edge 12 (caniuse), and upstream inuitcss removed the prefixes in 9cc4ed0 in 2016.
  • To verify, I compiled warehouse.scss and noscript.scss on main and after each commit, expanded and compressed, and ran rtlcss on warehouse.scss. Through c4d084d84 the compressed and RTL output is byte-identical to main. Against main, the final branch differs only in the box-sizing rules: no prefixed declarations, ::before/::after, and no banner comment in unminified output. All 586 class names in the compiled CSS pass the new pattern.

    The pattern checks selectors as written, so a nested &__element or &--modifier is not resolved against its parent, and stylelint 17 has no option to do so. Writing those selectors out in full and enabling scss/selector-no-union-class-name would close the gap. I left that for a follow-up.

    Refs #12774

    Diff: 347 lines (+260 / -87) across 4 files Reviewer: JacobCoffee Review duration: 16038m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 347 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.350
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #20945"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.6% (HIGH) · Higher = larger blast radius
    65.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.9% · Safe to merge
    25.9%
    Repository