-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat: add ignoreComment options in indent #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 ignoreCommentContent option to the indent rule, allowing developers to skip indentation checking for HTML comment content. This is useful when free-form indentation inside HTML comments is desired.
- Added
ignoreCommentContentboolean option (default:false) to control whether comment content indentation is checked - Updated the indent checking logic to skip
CommentContentnodes when the option is enabled - Added test cases covering both enabled and disabled states of the new option
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/eslint-plugin/lib/rules/indent/indent.js | Implements the ignoreCommentContent option by adding early returns in CommentContent and CommentContent:exit handlers |
| packages/eslint-plugin/tests/rules/indent.test.js | Adds test cases for valid (ignoreCommentContent: true) and invalid (ignoreCommentContent: false) scenarios |
| docs/rules/indent.md | Documents the new ignoreCommentContent option and its behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #445 +/- ##
=======================================
Coverage 98.56% 98.56%
=======================================
Files 84 84
Lines 2788 2791 +3
Branches 777 778 +1
=======================================
+ Hits 2748 2751 +3
Misses 40 40
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
* feat: add ignoreComment options in indent (yeonjuan#445) * feat: add ignoreCommentContent options in indent * add tests * add options doc * Update indent.js * update * Update indent.md * v0.48.0 --------- Co-authored-by: YeonJuan <yeonjuan93@naver.com>
Checklist
Description