File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ rxXIyGcdFUjpY/U2tobjXousbYyz8/DqgDoLWXOMt2dNkbbNAN8L3OMVTGb6TzS2
4646gd8URXIGc6Nk7ueWMKEZaropIg6q1J7e9qJdlzA6j1fu6vVY3qX3tA==
4747-----END RSA PRIVATE KEY-----` ;
4848
49+ const annotationsOrder : Record < Annotation [ 'annotation_level' ] , number > = {
50+ 'failure' : 1 ,
51+ 'warning' : 2 ,
52+ 'notice' : 3 ,
53+ }
54+
4955export async function createAnnotations ( results : eslint . CLIEngine . LintResult [ ] ) {
5056 const repoRoot = ( await execa ( 'git' , [ 'rev-parse' , '--show-toplevel' ] ) ) . stdout ;
5157
@@ -73,7 +79,7 @@ export async function createAnnotations(results: eslint.CLIEngine.LintResult[])
7379 }
7480 }
7581
76- return annotations ;
82+ return annotations . sort ( ( a , b ) => annotationsOrder [ a . annotation_level ] - annotationsOrder [ b . annotation_level ] ) ;
7783}
7884
7985export default async ( results : eslint . CLIEngine . LintResult [ ] ) => {
You can’t perform that action at this time.
0 commit comments