DEV Community

Discussion on: What is {x:1} and why does it return 1 🤷‍♂️

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Good linters will tell.

Collapse
 
jcubic profile image
Jakub T. Jankiewicz

This is what ESLint will tell you, you got errors but you may have no clue what they mean:

  5922:39  error  'x:' is defined but never used                    no-unused-labels
  5922:39  error  This line has 2 statements. Maximum allowed is 1  max-statements-per-line
  5922:42  error  Missing semicolon                                 semi
Enter fullscreen mode Exit fullscreen mode