clutchski / coffeelint

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

arrow_spacing should allow you to force 0 spaces on each side #628

Open joncodo opened 6 years ago

joncodo commented 6 years ago

Proposed coffeelint config setting

"arrow_spacing": {
    "level": "error",
    "spacing": {
      "left": 0,
      "right": 0
    }
  },

Good:

foo =()->

Bad

foo = () ->
foo = ()->

I will make a pull request for this. I will use it in my project but are you interested in having that in this? Should I make a pr?

swang commented 6 years ago

Sorry for the late reply. If you're still interested in doing this I would accept a PR for this, however the default would have to remain the same, which means maybe adding a parameter (that defaults to true) that ignores spacing if there is no parameters in the function call. Maybe called, ignoreIfNoParams or ignoreifEmptyParams