Expected property ‘playing’ to be ordered before property ‘src’

Continuing the discussion from Getting audio players to play their respective streams out of their element:

jslint is telling me this is an error.

It doesn’t make any sense, how is that wrong?

 function togglePlayButton(button) {
    const player = getAudio();
    const playing = isPlaying(button);
    showButton(button, {
      playing
    });
    manageAudio(player, {
      src: button.getAttribute("data-audio"),
      playing
    });
  }

The properties are expected to be in alphabetical order.

    manageAudio(player, {
      playing,
      src: button.getAttribute("data-audio")
    });
1 Like

I don’t understand, what do you mean by that?

Alphabetical means that A comes before B, which comes before C, and so on.

2 Likes

All fixed.

Thank you.