clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.18k stars 171 forks source link

Why ignore indentation inside arrays? #583

Open mkjois opened 8 years ago

mkjois commented 8 years ago

This comment provides a use case, but IMO people should just write it like this:

x = [
  "foo"
  "bar"
]

In my case, I found that coffeelint wasn't catching incorrect indentation for the following code (setting was at the default, 2 spaces):

angular.module 'myApp', [
    'ui.router'
]

.config [
    '$stateProvider'
    '$urlRouterProvider'
    ($stateProvider, $urlRouterProvider) ->
        $urlRouterProvider.otherwise '/'
        $stateProvider.state 'main',
            url: '/'
            template: '<div><p>Hello, world!</p></div>'
]