-
I have JS with: let SectObj = [ It gives an error: Expected property 'desc' to be ordered before property 'totSlides'. If I write as: let SectObj = [ It does not give error. I don't understand what the problem |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 // 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
} |
Beta Was this translation helpful? Give feedback.
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*/