Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update(deps): Update to lines-and-columns 2.0.1 #537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"eslint-plugin-prettier": "^2.2.0",
"lines-and-columns": "^1.1.6",
"lines-and-columns": "^2.0.1",
"tslib": "^1.7.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/prettierRule.ts
@@ -1,5 +1,5 @@
import * as utils from 'eslint-plugin-prettier';
import LineAndColumn from 'lines-and-columns';
import { LinesAndColumns } from 'lines-and-columns';
import * as path from 'path';
import * as prettier from 'prettier';
import * as tslint from 'tslint';
Expand Down Expand Up @@ -106,7 +106,7 @@ function reportSyntaxError(
source: string,
error: { message: string; loc: { start: { line: number; column: number } } },
) {
const locator = new LineAndColumn(source);
const locator = new LinesAndColumns(source);
const offset = locator.indexForLocation({
column: error.loc.start.column - 1,
line: error.loc.start.line - 1,
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -1403,6 +1403,11 @@ lines-and-columns@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"

lines-and-columns@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.2.tgz#84de68939c83376b568327a156899c64a369f4d5"
integrity sha512-RaBDLqsC4A5/YmPV5DENC2/Q4DaXsk89b+jhUFPl0kvkztkyjGnJAH0I6Bcze/fO06ieP0NxTM+02iXFlt0OZQ==

load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
Expand Down