Skip to content

Commit 2b2f11d

Browse files
realitykingnot-an-aardvark
authored andcommitted
Upgrade: babel-code-frame to version 7 (#10808)
1 parent 2824d43 commit 2b2f11d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/formatters/codeframe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"use strict";
66

77
const chalk = require("chalk");
8-
const codeFrame = require("babel-code-frame");
8+
const { codeFrameColumns } = require("@babel/code-frame");
99
const path = require("path");
1010

1111
//------------------------------------------------------------------------------
@@ -63,7 +63,7 @@ function formatMessage(message, parentResult) {
6363

6464
if (sourceCode) {
6565
result.push(
66-
codeFrame(sourceCode, message.line, message.column, { highlightCode: false })
66+
codeFrameColumns(sourceCode, { start: { line: message.line, column: message.column } }, { highlightCode: false })
6767
);
6868
}
6969

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"homepage": "https://eslint.org",
3636
"bugs": "https://github.com/eslint/eslint/issues/",
3737
"dependencies": {
38+
"@babel/code-frame": "^7.0.0",
3839
"ajv": "^6.5.3",
39-
"babel-code-frame": "^6.26.0",
4040
"chalk": "^2.1.0",
4141
"cross-spawn": "^6.0.5",
4242
"debug": "^3.1.0",

0 commit comments

Comments
 (0)