Skip to content

Conversation

@yeonjuan
Copy link
Owner

@yeonjuan yeonjuan commented Nov 7, 2025

Checklist

Description

@yeonjuan yeonjuan requested a review from Copilot November 7, 2025 14:33
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 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 ignoreCommentContent boolean option (default: false) to control whether comment content indentation is checked
  • Updated the indent checking logic to skip CommentContent nodes 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.

@yeonjuan yeonjuan changed the title feat: add ignoreCommentContent options in indent feat: add ignoreComment options in indent Nov 7, 2025
@yeonjuan yeonjuan merged commit eb572ad into main Nov 7, 2025
6 checks passed
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

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

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           
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/indent/indent.js 99.44% <100.00%> (+<0.01%) ⬆️
🚀 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.

AdamVig added a commit to Blue-Water-Autonomy/html-eslint that referenced this pull request Nov 7, 2025
* 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>
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.

Html comments are checked for indentation

2 participants