Skip to content

Commit

Permalink
fix(core): fix broken lines and columns import
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Jan 16, 2023
1 parent c3e904d commit 3dbd4ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nx/src/utils/json.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parse, printParseErrorCode, stripComments } from 'jsonc-parser';
import type { ParseError, ParseOptions } from 'jsonc-parser';
import LinesAndColumn from 'lines-and-columns';
import { LinesAndColumns } from 'lines-and-columns';

export { stripComments as stripJsonComments };

Expand Down Expand Up @@ -72,7 +72,7 @@ function formatParseError(
numContextLine: number
) {
const { error, offset, length } = parseError;
const { line, column } = new LinesAndColumn(input).locationForIndex(offset);
const { line, column } = new LinesAndColumns(input).locationForIndex(offset);

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

0 comments on commit 3dbd4ea

Please sign in to comment.