Skip to content

Conversation

@yeonjuan
Copy link
Owner

@yeonjuan yeonjuan commented Aug 9, 2025

Checklist

Description

@yeonjuan yeonjuan requested a review from Copilot August 9, 2025 14:17
@yeonjuan yeonjuan marked this pull request as ready for review August 9, 2025 14:17
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 message option to the require-attrs ESLint rule, allowing users to provide custom error messages when rule violations occur. The implementation maintains backward compatibility by using default messages when no custom message is provided.

  • Adds optional message parameter to rule configuration
  • Updates rule logic to use custom messages when provided
  • Enhances documentation with detailed option descriptions and examples

Reviewed Changes

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

File Description
packages/eslint-plugin/lib/rules/require-attrs.js Implements the message option functionality in the rule logic
packages/eslint-plugin/tests/rules/require-attrs.test.js Adds comprehensive test cases for the new custom message feature
docs/rules/require-attrs.md Updates documentation with detailed option descriptions and usage examples
docs/rules.md Adds unrelated rule entry that appears to be accidentally included

@yeonjuan yeonjuan changed the title feat: [require-attrs] add message options feat: add message options to the require-attrs Aug 9, 2025
@yeonjuan yeonjuan merged commit 1056c3b into main Aug 9, 2025
5 checks passed
@yeonjuan yeonjuan deleted the fix/400 branch August 9, 2025 14:22
@codecov
Copy link

codecov bot commented Aug 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.56%. Comparing base (e05c325) to head (b66705a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #401   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files          83       83           
  Lines        2712     2716    +4     
  Branches      752      756    +4     
=======================================
+ Hits         2673     2677    +4     
  Misses         39       39           
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/require-attrs.js 98.14% <100.00%> (+0.14%) ⬆️
🚀 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.

[FEATURE] add a "message" option for equire-attrs

2 participants