Skip to content

Can't understand error Expected property 'desc' to be ordered before property ... #373

Answered by kaizhu256
HiHoS asked this question in Q&A
Discussion options

You must be logged in to vote

jslint is making a style-complaint that the properties are not sorted. the reasoning is to prevent chaotic/haphazard property listings for large dictionaries/configs/options. you can disable the style-warning with directive /*jslint unordered*/

// properties are unsorted
{
    fstSlide:27,
    lastSlide:28,
    totSlides:2,
    desc:"3. Aviation" // Expected property 'desc' to be ordered before property 'totSlides'
}

// properties sorted in ascii-order
{
    desc:"3. Aviation",
    fstSlide:27,
    lastSlide:28,
    totSlides:2
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kaizhu256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #372 on November 11, 2021 15:01.