Skip to content

Commit 5e1c0ec

Browse files
committed
fix: create hasError getter
1 parent 4aa4f77 commit 5e1c0ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/linter/index.mjs

+9
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,13 @@ export class Linter {
5454
reporter(issue);
5555
}
5656
}
57+
58+
/**
59+
* Returns whether there are any issues with a level of 'error'
60+
*
61+
* @returns {boolean}
62+
*/
63+
get hasError() {
64+
return this.#issues.some(issue => issue.level === 'error');
65+
}
5766
}

0 commit comments

Comments
 (0)