File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,32 @@ import request from "browser-request";
3
3
const url = "/access_lint/errors"
4
4
5
5
export default function ( message ) {
6
- const violations = message . violations ;
6
+ var violations = message . violations . map ( function ( violation ) {
7
+ return {
8
+ description : violation . description ,
9
+ help : violation . help ,
10
+ helpUrl : violation . helpUrl ,
11
+ id : violation . id ,
12
+ nodes : violation . nodes . map ( function ( n ) {
13
+ return {
14
+ target : n . target ,
15
+ impact : n . impact
16
+ } ;
17
+ } ) ,
18
+ tags : violation . tags
19
+ } ;
20
+ } ) ;
7
21
8
22
if ( violations . length > 0 ) {
9
23
request ( {
10
24
method : "POST" ,
11
25
url : url ,
12
- json : message ,
26
+ json : {
27
+ accesslint : {
28
+ violations : violations ,
29
+ url : window . location . pathname
30
+ }
31
+ }
13
32
} , function ( ) { } ) ;
14
33
}
15
34
}
You can’t perform that action at this time.
0 commit comments