Skip to content

Commit 96794b7

Browse files
committed
chore: wip
1 parent a07ac77 commit 96794b7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/stx/src/analyzer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* stx Template Analyzer - Analyze templates for performance, best practices, and potential issues
33
*/
44

5+
import process from 'node:process'
6+
57
export interface AnalysisResult {
68
file: string
79
metrics: TemplateMetrics

packages/stx/src/formatter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ function formatHtml(content: string, options: Required<FormatterOptions>): strin
274274
if (line.startsWith('<') && !line.includes('/>') && !line.startsWith('</')) {
275275
// Check if it's not a self-closing tag or comment
276276
// Also check if the line contains both opening and closing tags (e.g., <title>Text</title>)
277+
// eslint-disable-next-line regexp/optimal-quantifier-concatenation
277278
const hasMatchingClosingTag = line.match(/<(\w+)[^>]*>.*<\/\1>/)
278279
if (!line.includes('<!') && !isSelfClosingTag(line) && !hasMatchingClosingTag) {
279280
indentLevel++

0 commit comments

Comments
 (0)