File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,15 @@ const levelToColorMap = {
17
17
* @type {import('../types.d.ts').Reporter }
18
18
*/
19
19
export default issue => {
20
+ const position = issue . location . position
21
+ ? ` (${ issue . location . position . start } :${ issue . location . position . end } )`
22
+ : '' ;
23
+
20
24
console . log (
21
25
styleText (
22
26
// @ts -expect-error ForegroundColors is not exported
23
27
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 } `
25
29
)
26
30
) ;
27
31
} ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export type IssueLevel = 'info' | 'warn' | 'error';
4
4
5
5
export interface LintIssueLocation {
6
6
path : string ; // The absolute path to the file
7
- position : Position ;
7
+ position ? : Position ;
8
8
}
9
9
10
10
export interface LintIssue {
You can’t perform that action at this time.
0 commit comments