Skip to content

Commit e1c7cfc

Browse files
committed
chore: wip
1 parent 959a730 commit e1c7cfc

File tree

7 files changed

+9
-49
lines changed

7 files changed

+9
-49
lines changed

benchmark.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-console */
12
import { readFile } from 'node:fs/promises'
23
import { performance } from 'node:perf_hooks'
34
import { extractDeclarations } from './src/extractor'

src/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import type { DtsGenerationOption } from './types'
44
import { resolve } from 'node:path'
5+
import process from 'node:process'
56
import { parseArgs } from 'node:util'
67
import { config as defaultConfig } from './config'
78
import { generate } from './generator'

src/generator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable no-console */
2+
13
import type { DtsGenerationConfig, ProcessingContext } from './types'
24
import { Glob } from 'bun'
35
import { mkdir, readFile } from 'node:fs/promises'

src/parser.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/**
2-
* Parser utilities for TypeScript syntax
3-
*/
1+
/* eslint-disable regexp/no-super-linear-backtracking */
42

53
/**
64
* Remove leading comments from a declaration
@@ -129,7 +127,7 @@ export function extractBalancedSymbols(
129127

130128
for (i = 0; i < text.length; i++) {
131129
const char = text[i]
132-
const prevChar = i > 0 ? text[i - 1] : ''
130+
const _prevChar = i > 0 ? text[i - 1] : ''
133131

134132
// Handle string literals
135133
if (!escaped && (char === '"' || char === '\'' || char === '`')) {

src/processor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable regexp/no-super-linear-backtracking, regexp/no-misleading-capturing-group, regexp/optimal-quantifier-concatenation */
12
import type { Declaration, ProcessingContext } from './types'
23

34
/**

test-generate.ts

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

test/debug-single.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
/* eslint-disable no-console */
12
import type { DtsGenerationOption } from '../src/types'
23
import { writeFile } from 'node:fs/promises'
34
import { join } from 'node:path'
5+
import process from 'node:process'
46
import { generate } from '../src/generator'
57

68
async function debugSingle() {

0 commit comments

Comments
 (0)