Skip to content

Conversation

@yeonjuan
Copy link
Owner

Checklist

Description

@yeonjuan yeonjuan requested a review from Copilot August 11, 2025 11:45
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 fixes a bug where the tagChildrenIndent configuration option was not being applied to text children of HTML elements. The fix ensures that text nodes respect the same indentation rules as other child elements when tagChildrenIndent is configured.

  • Added support for text nodes in the getTagIncreasingLevel function
  • Updated type annotations to include Text nodes
  • Added comprehensive test cases covering text child indentation scenarios

Reviewed Changes

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

File Description
packages/eslint-plugin/lib/rules/indent/indent.js Updated indentation logic to handle text nodes and include Text type in function signatures
packages/eslint-plugin/tests/rules/indent.test.js Added test cases for valid and invalid text child indentation with tagChildrenIndent configuration

@yeonjuan yeonjuan merged commit f01a157 into main Aug 11, 2025
5 checks passed
@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files          83       83           
  Lines        2716     2716           
  Branches      756      756           
=======================================
  Hits         2677     2677           
  Misses         39       39           
Flag Coverage Δ
unittest 98.56% <100.00%> (ø)

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.43% <100.00%> (ø)
🚀 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.

@yeonjuan yeonjuan deleted the fix-406 branch August 11, 2025 13:26
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.

[BUG] indent with tagChildrenIndent rule doesn’t work on unwrapped text

2 participants