Skip to content

Commit a70eec8

Browse files
authored
fix(core): fix broken lines and columns import (#14394)
1 parent c3e904d commit a70eec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nx/src/utils/json.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { parse, printParseErrorCode, stripComments } from 'jsonc-parser';
22
import type { ParseError, ParseOptions } from 'jsonc-parser';
3-
import LinesAndColumn from 'lines-and-columns';
3+
import { LinesAndColumns } from 'lines-and-columns';
44

55
export { stripComments as stripJsonComments };
66

@@ -72,7 +72,7 @@ function formatParseError(
7272
numContextLine: number
7373
) {
7474
const { error, offset, length } = parseError;
75-
const { line, column } = new LinesAndColumn(input).locationForIndex(offset);
75+
const { line, column } = new LinesAndColumns(input).locationForIndex(offset);
7676

7777
const errorLines = [
7878
`${printParseErrorCode(error)} in JSON at ${line + 1}:${column + 1}`,

0 commit comments

Comments
 (0)