Skip to content

Commit 1744022

Browse files
committed
fix(lint): exclude html directory and auto-fix lint issues
- Add html/ to .gitignore (Vitest UI output) - Add html/ to biome.json excludes - Remove html/ from git tracking - Auto-fix lint issues in test files (template literals, unused imports, etc.) This resolves the CI failure caused by linting minified Vitest UI files.
1 parent 6032b34 commit 1744022

42 files changed

Lines changed: 381 additions & 302 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Thumbs.db
1313
**/.cache
1414
**/coverage
1515
**/dist
16+
**/html
1617
**/node_modules
1718
**/*.tgz
1819
**/*.tmp

biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"!**/.vscode",
1515
"!**/coverage",
1616
"!**/dist",
17+
"!**/html",
1718
"!**/node_modules",
1819
"!**/package.json",
1920
"!**/pnpm-lock.yaml",

html/assets/index-COTh6lXR.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

html/assets/index-DOkKC3NI.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

html/bg.png

-186 KB
Binary file not shown.

html/favicon.ico

-814 Bytes
Binary file not shown.

html/favicon.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

html/html.meta.json.gz

-232 KB
Binary file not shown.

html/index.html

Lines changed: 0 additions & 32 deletions
This file was deleted.

test/ansi.test.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,27 @@ describe('ansi', () => {
5656

5757
it('should match ANSI reset code', () => {
5858
const regex = ansiRegex()
59-
const text = `\x1b[0mPlain text`
59+
const text = '\x1b[0mPlain text'
6060
expect(regex.test(text)).toBe(true)
6161
})
6262

6363
it('should match ANSI color codes', () => {
6464
const regex = ansiRegex()
65-
const text = `\x1b[31mRed text\x1b[0m`
65+
const text = '\x1b[31mRed text\x1b[0m'
6666
expect(regex.test(text)).toBe(true)
6767
})
6868

6969
it('should match multiple ANSI codes', () => {
7070
const regex = ansiRegex()
71-
const text = `\x1b[1m\x1b[31mBold red\x1b[0m`
71+
const text = '\x1b[1m\x1b[31mBold red\x1b[0m'
7272
const matches = text.match(regex)
7373
expect(matches).not.toBeNull()
7474
expect(matches?.length).toBeGreaterThanOrEqual(2)
7575
})
7676

7777
it('should match CSI sequences', () => {
7878
const regex = ansiRegex()
79-
const text = `\x1b[2J\x1b[H`
79+
const text = '\x1b[2J\x1b[H'
8080
expect(regex.test(text)).toBe(true)
8181
})
8282

@@ -93,7 +93,7 @@ describe('ansi', () => {
9393

9494
it('should create non-global regex when onlyFirst is true', () => {
9595
const regex = ansiRegex({ onlyFirst: true })
96-
const text = `\x1b[31mRed\x1b[0m`
96+
const text = '\x1b[31mRed\x1b[0m'
9797
const match = text.match(regex)
9898
expect(match).not.toBeNull()
9999
expect(match?.[0]).toBe('\x1b[31m')
@@ -102,17 +102,17 @@ describe('ansi', () => {
102102

103103
describe('stripAnsi', () => {
104104
it('should strip ANSI codes from text', () => {
105-
const text = `\x1b[31mRed text\x1b[0m`
105+
const text = '\x1b[31mRed text\x1b[0m'
106106
expect(stripAnsi(text)).toBe('Red text')
107107
})
108108

109109
it('should strip bold formatting', () => {
110-
const text = `\x1b[1mBold text\x1b[0m`
110+
const text = '\x1b[1mBold text\x1b[0m'
111111
expect(stripAnsi(text)).toBe('Bold text')
112112
})
113113

114114
it('should strip multiple ANSI codes', () => {
115-
const text = `\x1b[1m\x1b[31mBold red\x1b[0m`
115+
const text = '\x1b[1m\x1b[31mBold red\x1b[0m'
116116
expect(stripAnsi(text)).toBe('Bold red')
117117
})
118118

@@ -126,52 +126,52 @@ describe('ansi', () => {
126126
})
127127

128128
it('should strip color codes', () => {
129-
const text = `\x1b[31mRed\x1b[32mGreen\x1b[34mBlue\x1b[0m`
129+
const text = '\x1b[31mRed\x1b[32mGreen\x1b[34mBlue\x1b[0m'
130130
expect(stripAnsi(text)).toBe('RedGreenBlue')
131131
})
132132

133133
it('should strip underline and italic', () => {
134-
const text = `\x1b[3m\x1b[4mUnderlined Italic\x1b[0m`
134+
const text = '\x1b[3m\x1b[4mUnderlined Italic\x1b[0m'
135135
expect(stripAnsi(text)).toBe('Underlined Italic')
136136
})
137137

138138
it('should strip background colors', () => {
139-
const text = `\x1b[41mRed background\x1b[0m`
139+
const text = '\x1b[41mRed background\x1b[0m'
140140
expect(stripAnsi(text)).toBe('Red background')
141141
})
142142

143143
it('should strip 256 color codes', () => {
144-
const text = `\x1b[38;5;196mBright red\x1b[0m`
144+
const text = '\x1b[38;5;196mBright red\x1b[0m'
145145
expect(stripAnsi(text)).toBe('Bright red')
146146
})
147147

148148
it('should strip RGB color codes', () => {
149-
const text = `\x1b[38;2;255;0;0mRGB red\x1b[0m`
149+
const text = '\x1b[38;2;255;0;0mRGB red\x1b[0m'
150150
expect(stripAnsi(text)).toBe('RGB red')
151151
})
152152

153153
it('should handle text with only ANSI codes', () => {
154-
const text = `\x1b[31m\x1b[1m\x1b[0m`
154+
const text = '\x1b[31m\x1b[1m\x1b[0m'
155155
expect(stripAnsi(text)).toBe('')
156156
})
157157

158158
it('should handle mixed content', () => {
159-
const text = `Normal \x1b[1mbold\x1b[0m normal \x1b[31mred\x1b[0m end`
159+
const text = 'Normal \x1b[1mbold\x1b[0m normal \x1b[31mred\x1b[0m end'
160160
expect(stripAnsi(text)).toBe('Normal bold normal red end')
161161
})
162162

163163
it('should handle newlines and special chars', () => {
164-
const text = `\x1b[31mLine 1\nLine 2\x1b[0m`
164+
const text = '\x1b[31mLine 1\nLine 2\x1b[0m'
165165
expect(stripAnsi(text)).toBe('Line 1\nLine 2')
166166
})
167167

168168
it('should handle unicode characters', () => {
169-
const text = `\x1b[31m你好世界\x1b[0m`
169+
const text = '\x1b[31m你好世界\x1b[0m'
170170
expect(stripAnsi(text)).toBe('你好世界')
171171
})
172172

173173
it('should handle emojis', () => {
174-
const text = `\x1b[32m✓\x1b[0m Success`
174+
const text = '\x1b[32m✓\x1b[0m Success'
175175
expect(stripAnsi(text)).toBe('✓ Success')
176176
})
177177
})
@@ -220,18 +220,18 @@ describe('ansi', () => {
220220
})
221221

222222
it('should handle very long strings', () => {
223-
const longText = 'a'.repeat(10000)
223+
const longText = 'a'.repeat(10_000)
224224
const formatted = `\x1b[31m${longText}\x1b[0m`
225225
expect(stripAnsi(formatted)).toBe(longText)
226226
})
227227

228228
it('should handle nested ANSI codes', () => {
229-
const text = `\x1b[31m\x1b[1mNested\x1b[0m\x1b[0m`
229+
const text = '\x1b[31m\x1b[1mNested\x1b[0m\x1b[0m'
230230
expect(stripAnsi(text)).toBe('Nested')
231231
})
232232

233233
it('should handle repeated reset codes', () => {
234-
const text = `\x1b[31mRed\x1b[0m\x1b[0m\x1b[0m`
234+
const text = '\x1b[31mRed\x1b[0m\x1b[0m\x1b[0m'
235235
expect(stripAnsi(text)).toBe('Red')
236236
})
237237
})

0 commit comments

Comments
 (0)