Skip to content

Commit 46d5af2

Browse files
committed
fix(build): resolve TypeScript error and lint output issues
- Exclude vitest.config.ts from main tsconfig to fix import.meta error (vitest.config.ts uses ESM syntax incompatible with CommonJS module setting) - Replace logger.error('') with console.log('') in lint script to prevent spurious red ✗ symbol when adding newlines
1 parent 97aefff commit 46d5af2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/lint.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ async function runLintOnFiles(files, options = {}) {
223223

224224
if (!quiet) {
225225
logger.clearLine().done('Linting passed')
226-
// Add newline after message (use error to write to same stream)
227-
logger.error('')
226+
// Add newline after message
227+
console.log('')
228228
}
229229

230230
return 0
@@ -297,8 +297,8 @@ async function runLintOnAll(options = {}) {
297297

298298
if (!quiet) {
299299
logger.clearLine().done('Linting passed')
300-
// Add newline after message (use error to write to same stream)
301-
logger.error('')
300+
// Add newline after message
301+
console.log('')
302302
}
303303

304304
return 0

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
"pacote": ["./src/external/pacote"]
4141
}
4242
},
43-
"include": ["src/**/*.ts", "src/**/*.d.ts", "vitest.config.ts"],
43+
"include": ["src/**/*.ts", "src/**/*.d.ts"],
4444
"exclude": ["node_modules", "dist/**/*", "lib", "test", "src/**/*.js"]
4545
}

0 commit comments

Comments
 (0)