Parse Error in javascript files

sonarjs

(Martin Mlostek) #1

I am getting this strange errors from the sonar scanner in some js files

ERROR: Unable to parse file: file:///Users/mlostek/Projects/Skoove/skoove_IOs/ios_app/components/CircleImage.js
ERROR: Parse error at line 19 column 34:

 9:
10:   isOnTablet ? (
11:     imageStyle = [...imageStyle, styles.image_tablet]
12:   ) : (
13:     imageStyle = [...imageStyle, styles.image_phone]
14:   );
15:
16:   return (
17:
18:     props.onlyImage
19:       ? ()
                                     ^
20:       : (
21:         
22:           
23:         
24:       )
25:
26:
27:   );
28: };
29:

Whats wrong with this line?
Why is the scanner not able to scan that file?
And Is it possible to show the “unchecked” files somehow in sonarcloud?


(Tibor Blenessy) #3

hello @mlostekk ,

I am not sure if the formatting is correct, there seems to be a lot of whitespace. Can you share the original file? (you can do that also privately, if sharing publicly is not an option)