Skip to content

feat: add @namespace validation to no-invalid-at-rule-placement rule#183

Merged
nzakas merged 4 commits into
eslint:mainfrom
TKDev7:namespace
Jul 23, 2025
Merged

feat: add @namespace validation to no-invalid-at-rule-placement rule#183
nzakas merged 4 commits into
eslint:mainfrom
TKDev7:namespace

Conversation

@TKDev7

@TKDev7 TKDev7 commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Prerequisites checklist

What is the purpose of this pull request?

This pull request implements and enforces the correct placement of the @namespace at-rule in CSS, according to the specification: @namespace must be placed before all other rules, except @charset and @import.

What changes did you make? (Give an overview)

  • Updated the no-invalid-at-rule-placement rule to check for the correct placement of @namespace.
  • Added tests to verify correct and incorrect placements of @namespace and other at-rules.
  • Updated documentation to reflect the new rule behavior and provide usage examples.

Related Issues

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

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jun 26, 2025
@TKDev7 TKDev7 marked this pull request as draft June 26, 2025 14:07
@nzakas nzakas moved this from Needs Triage to Implementing in Triage Jul 2, 2025
@snitin315

Copy link
Copy Markdown
Contributor

Hi @TKDev7, are you still working on this?

@TKDev7

TKDev7 commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

@snitin315 #171 needs to be merged first.

@snitin315

Copy link
Copy Markdown
Contributor

Done

@TKDev7 TKDev7 marked this pull request as ready for review July 17, 2025 03:12
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jul 17, 2025
@lumirlumir

Copy link
Copy Markdown
Member

Hi, @TKDev7

Could you please add appropriate descriptions to the PR template?

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code looks good. Just want to clarify some things in the docs.

Comment thread docs/rules/no-invalid-at-rule-placement.md Outdated
Comment thread docs/rules/no-invalid-at-rule-placement.md Outdated

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

@nzakas nzakas merged commit 26b902c into eslint:main Jul 23, 2025
22 checks passed
@github-project-automation github-project-automation Bot moved this from Implementing to Complete in Triage Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion feature

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

4 participants