davidwaterston / eslint-plugin-objects

A small collection of ESLint (http://eslint.org) rules that enforce more strict stylistic conventions for the layout of multi-property objects.
MIT License
10 stars 3 forks source link

Add a rule for collections #8

Open gajus opened 8 years ago

gajus commented 8 years ago
[{
    name: 'wellpark',
    nid: 'wellpark',
    url: 'http://www.eyecinema.ie/cinemas/location.asp'
}]

and

[{
    name: 'wellpark',
    nid: 'wellpark',
    url: 'http://www.eyecinema.ie/cinemas/location.asp'
}, {
    name: 'wellpark',
    nid: 'wellpark',
    url: 'http://www.eyecinema.ie/cinemas/location.asp'
}]

must be:

[
    {
        name: 'wellpark',
        nid: 'wellpark',
        url: 'http://www.eyecinema.ie/cinemas/location.asp'
    }
]

and

[
    {
        name: 'wellpark',
        nid: 'wellpark',
        url: 'http://www.eyecinema.ie/cinemas/location.asp'
    },
    {
        name: 'wellpark',
        nid: 'wellpark',
        url: 'http://www.eyecinema.ie/cinemas/location.asp'
    }
]