Skip to content

Conversation

@nzakas
Copy link
Member

@nzakas nzakas commented Aug 18, 2025

Prerequisites checklist

What is the purpose of this pull request?

Allow nested at-rules to contain nested rules

What changes did you make? (Give an overview)

  • Propagate allowNestedRules setting into at-rules so they can pass that on to their Block() calls.
  • Added tests.

Related Issues

fixes #66

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Aug 18, 2025
@eslintbot eslintbot added this to Triage Aug 18, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Aug 18, 2025
@coveralls
Copy link

coveralls commented Aug 18, 2025

Pull Request Test Coverage Report for Build 17156414002

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.618%

Totals Coverage Status
Change from base Build 17043236960: 0.0%
Covered Lines: 11829
Relevant Lines: 11961

💛 - Coveralls

Copy link

Copilot AI left a 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 enables nested CSS rules within at-rules by propagating the allowNestedRules configuration option through the parsing chain. The fix addresses issue #66 where nested rules inside at-rules like @media were not being properly supported.

  • Propagate allowNestedRules setting from Block to Atrule parsing
  • Update @media at-rule handler to accept and pass through the nesting configuration
  • Add comprehensive test coverage for nested at-rules with nesting selectors

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/syntax/node/Block.js Pass allowNestedRules option to Atrule parser
lib/syntax/node/Atrule.js Accept and propagate allowNestedRules to block parsing
lib/syntax/atrule/media.js Update media at-rule to handle allowNestedRules option
lib/__tests/parse.js Add blank line (formatting change)
fixtures/ast/rule/nesting.json Add test case for nested @media with nesting selector

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fasttime fasttime moved this from Needs Triage to Implementing in Triage Aug 25, 2025
@fasttime fasttime merged commit c166f2d into main Aug 25, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Issue with nested css linting support (follow-up to #33)

5 participants