Skip to content

Conversation

@yeonjuan
Copy link
Owner

Checklist

Description

@yeonjuan yeonjuan requested a review from Copilot September 24, 2025 15:03
Copy link
Contributor

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 adds a new ESLint rule no-restricted-tags that allows developers to disallow the use of specified HTML tags based on configurable regex patterns. The rule supports custom error messages and multiple pattern configurations.

Key changes:

  • Implementation of the no-restricted-tags rule with regex pattern matching for tag names
  • Support for custom error messages and multiple restriction configurations
  • Comprehensive test coverage including template literals and various HTML tag scenarios

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/eslint-plugin/lib/rules/no-restricted-tags.js Core rule implementation with PatternChecker class for regex matching
packages/eslint-plugin/tests/rules/no-restricted-tags.test.js Comprehensive test suite covering valid/invalid cases and template scenarios
packages/eslint-plugin/lib/rules/index.js Exports the new rule to make it available
docs/rules/no-restricted-tags.md Documentation with usage examples and configuration options

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

@yeonjuan yeonjuan marked this pull request as ready for review September 24, 2025 22:34
@yeonjuan yeonjuan merged commit 3c8f564 into main Sep 25, 2025
5 checks passed
@yeonjuan yeonjuan deleted the no-restricted-tags branch September 25, 2025 12:10
@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.56%. Comparing base (60aac30) to head (05b4096).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
+ Coverage   98.54%   98.56%   +0.01%     
==========================================
  Files          83       84       +1     
  Lines        2751     2788      +37     
  Branches      768      777       +9     
==========================================
+ Hits         2711     2748      +37     
  Misses         40       40              
Flag Coverage Δ
unittest 98.56% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/eslint-plugin/lib/rules/index.js 100.00% <100.00%> (ø)
...ages/eslint-plugin/lib/rules/no-restricted-tags.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[request] New rule no-restricted-tags

2 participants