babel-code-frame
Generate errors that contain a code frame that point to source locations.
Install
Usage
If the column number is not known, you may pass null
instead.
Options
highlightCode
highlightCode
boolean
, defaults to false
.
Toggles syntax highlighting the code as JavaScript for terminals.
linesAbove
linesAbove
number
, defaults to 2
.
Adjust the number of lines to show above the error.
linesBelow
linesBelow
number
, defaults to 3
.
Adjust the number of lines to show below the error.
forceColor
forceColor
boolean
, defaults to false
.
Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides highlightCode
.
Last updated