Skip to content

Commit

Permalink
ignore spurious rootDir warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Nov 15, 2023
1 parent 0dc06db commit 6e9365d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/service/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import { getCanonicalFileName } from './get-canonical-filename.js'

const cwd = process.cwd()

// Ignore the rootDir warning. Just means we're running something outside of
// cwd, which happens a lot in tests where we're spinning up the daemon and
// stuff repeatedly in test dirs, but almost never irl, and isn't a problem
// anyway.
export const reportAll = (
diagnostics: Diagnostic[],
pretty?: boolean
) => diagnostics.map(d => report(d, pretty))
) =>
diagnostics.filter(d => d.code !== 6059).map(d => report(d, pretty))

const host = {
getCurrentDirectory: () => cwd,
Expand Down

0 comments on commit 6e9365d

Please sign in to comment.