18
crisz
7y

Dear ESLint,
- you convinced me to put a space between function() and {
- you convinced me to use single quotes for strings in place of double quotes
- you convinced me to put a space between inline operators
- you had me when you said that trailing spaces shouldn't compare in my code
- you said to put semicolons at the end of each instruction, and I thought it wasn't a so bad idea

BUT NO FUCK OFF NO NEVER I WON'T NEVER PUT A FUCKING TRAILING COMMA IN THE END OF JAVASCRIPT OBJECT IT'S MEANINGLESS UGLY A WASTE OF A FUCKING BYTE.
WHY THE FUCK I SHOULD TYPE var obj = {a: 'some text',} INSTEAD OF var obj = {a: 'some text'} WHY WHAT'S THE MEANING OF THAT FUCKING COMMA

Comments
  • 7
    It makes sense. With comma it's easier to extend and git diff would be better to read.
  • 6
    It's especially nice when you have a multi line declaration like

    const obj = {
    foo: 'bar',
    xyz: 'if I just want to add this property git blame doesn't show any changes on the line above',
    }
  • 5
    You know eslint is configurable, right?

    Just add 'comma-dangle': ['error', 'never'] to your .eslintrc.js and you're good.

    If you want to try what @simeg said while still having clean inline objects, use 'always-multiline' instead of 'never'.
  • 1
    @shellbug I was trying to be a good developer, then I ended up overriding the loopback .eslintrc
  • 2
    It's one of the best feature imo. After writing almost 10k-20k code for devRantron, I have to say it really helps when you are extending objects or copy-pasting. Love it.
  • 0
    Wait... You didn't do any of these before?
  • 0
    @Krokoklemme Nope.

    function greet(name){
    console.log("Hi "+name+"!");
    }

    This was ok for me :(
  • 0
    PS. the indentation was removed by devRant, I had put it
  • 0
    @crisz gnarf...

    That's so... unreadable...
Add Comment