Skip to content

Commit

Permalink
fix(core): fix broken lines and columns import (#14394)
Browse files Browse the repository at this point in the history
(cherry picked from commit a70eec8)
  • Loading branch information
meeroslav authored and FrozenPandaz committed Jan 17, 2023
1 parent 23d1073 commit 74ca312
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 74ca312

Please sign in to comment.