File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,15 @@ const levelToColorMap = {
1717 * @type {import('../types.d.ts').Reporter }
1818 */
1919export default issue => {
20+ const position = issue . location . position
21+ ? ` (${ issue . location . position . start } :${ issue . location . position . end } )`
22+ : '' ;
23+
2024 console . log (
2125 styleText (
2226 // @ts -expect-error ForegroundColors is not exported
2327 levelToColorMap [ issue . level ] ,
24- `${ issue . message } at ${ issue . location . path } ( ${ issue . location . position . start } : ${ issue . location . position . end } ) `
28+ `${ issue . message } at ${ issue . location . path } ${ position } `
2529 )
2630 ) ;
2731} ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export type IssueLevel = 'info' | 'warn' | 'error';
44
55export interface LintIssueLocation {
66 path : string ; // The absolute path to the file
7- position : Position ;
7+ position ? : Position ;
88}
99
1010export interface LintIssue {
You can’t perform that action at this time.
0 commit comments