Skip to content

test: cover configuration comments with surrounding text - #626

Open
snitin315 wants to merge 1 commit into
mainfrom
test/config-comments-surrounding-text
Open

snitin315 wants to merge 1 commit into
mainfrom
test/config-comments-surrounding-text

Conversation

@snitin315

@snitin315 snitin315 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

Check all that apply.

  • I did not use AI to generate this PR.
  • I used AI to write or edit the description of this PR (including translation).
  • I used AI to understand the codebase.
  • I used AI to write or edit the files in this PR and I reviewed the files.

What is the purpose of this pull request?

This adds tests that configuration comments still apply when they have text before or after them.

What changes did you make? (Give an overview)

Added following tests:

  /* eslint-disable css/no-empty-blocks */
  a {}
/* eslint-disable css/no-empty-blocks */ 
a {}
/* eslint-disable css/no-empty-blocks */ /* note */
a {}
a /* eslint-disable css/no-empty-blocks */ {}

Related Issues

Verifies eslint/markdown#764 in css repo

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

No behaviour change

Summary by CodeRabbit

  • Tests
    • Added coverage for indented and whitespace-padded disable comments, including comments with surrounding text.
    • Verified that empty-block warnings are suppressed and that the suppressed message location is reported correctly.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The integration tests add four disable-comment cases. Each case checks that the empty-block warning is suppressed and verifies the location of the suppressed message.

Changes: Comment suppression tests

Layer / File(s) Summary
Disable-comment formatting cases
tests/plugin/eslint.test.js
Adds tests for indented comments, trailing whitespace, following text, and text before and after a disable comment. Each test checks the suppressed warning location.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: nzakas, pixel998

Merge Risk: Minimal · up to bb90e

This PR adds test coverage for configuration comments with surrounding text and does not change runtime behavior. It is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "test: cover configuration comments with surrounding text" matches the changeset. The raw summary says the PR adds ESLint plugin tests for configuration comments (disable comments) with inde…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test: cover configuration comments with surrounding text" matches the changeset. The raw summary says the PR adds ESLint plugin tests for configuration comments (disable comments) with indentation, trailing whitespace, and surrounding text, and each test checks that the empty-block warning is suppressed. The objectives describe CSS configuration comments with text before or after them, which is a slightly different file scope than the summary's eslint test file, but the title still describes the main change. The title is concise, specific, and follows the conventional test: prefix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1752f02-c257-4229-99fe-aeccf4d73d83
Commits

Reviewing files that changed from the base of the PR and between c06546f and bb90e7f.

Files selected for processing: 1

  • tests/plugin/eslint.test.js

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant