Skip to content

fix(linter): prevent squashed inline comments from being "promoted" to cover the whole rule category.#6649

Closed
sterliakov wants to merge 7 commits intobiomejs:mainfrom
sterliakov:bugfix/gh-6621-rule-squashing
Closed

fix(linter): prevent squashed inline comments from being "promoted" to cover the whole rule category.#6649
sterliakov wants to merge 7 commits intobiomejs:mainfrom
sterliakov:bugfix/gh-6621-rule-squashing

Conversation

@sterliakov
Copy link
Copy Markdown
Contributor

@sterliakov sterliakov commented Jun 30, 2025

Summary

Fixes #6621

Prevent squashed inline comments from being "promoted" to cover the whole rule category.

This PR might be superseded by #6650 if that aligns with the maintainers opinion - please take a look!

Test Plan

Added a new test category that supports enabling multiple rules inline. Such tests must start with one or more lines of the shape

///! lint/{group}/{rule}

Added a testfile with multiple inline suppression comments. If the core idea of this PR is approved, I'll add more testcases covering non-jsx sources (that probably shouldn't matter, but there are too few tests for ignore comments, let's add more).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 30, 2025

⚠️ No Changeset found

Latest commit: 951dc19

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Jun 30, 2025
@sterliakov sterliakov changed the title Prevent squashed inline comments from being "promoted" to cover the whole rule category. fix(linter): Prevent squashed inline comments from being "promoted" to cover the whole rule category. Jun 30, 2025
@sterliakov sterliakov changed the title fix(linter): Prevent squashed inline comments from being "promoted" to cover the whole rule category. fix(linter): prevent squashed inline comments from being "promoted" to cover the whole rule category. Jun 30, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 30, 2025

CodSpeed Performance Report

Merging #6649 will not alter performance

Comparing sterliakov:bugfix/gh-6621-rule-squashing (951dc19) with main (4b501d3)

Summary

✅ 114 untouched benchmarks

Copy link
Copy Markdown
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

@sterliakov
Copy link
Copy Markdown
Contributor Author

Closing in favour or #6650 to avoid accidental merge, the branch remains available, this PR can be reopened if needed.

@sterliakov sterliakov closed this Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💅 Squashing suppression comments causes false negatives

2 participants