metarhia / jstp

Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
https://metarhia.github.io/jstp
Other
142 stars 10 forks source link

deps,lint: update eslint config #353

Closed nechaido closed 6 years ago

nechaido commented 6 years ago

Also fix all linter errors produced by implicit-arrow-linebreak rule.

lundibundi commented 6 years ago

What was the reason behind implicit-arrow-linebreak rule? I see no harm in having 2 styles of arrow functions, furthermore, I personally prefer to have it without parens or just with curly brackets. Can we remove it from our config?\ /cc @aqrln, as the one who added it.

nechaido commented 6 years ago

@lundibundi we can override the rule in our config, but I would prefer to have the same code style throughout the whole organisation, thus the whole idea of eslint-config-metarhia.

lundibundi commented 6 years ago

@nechaido well, I thought to override it in eslint-config-metarhia, that's why I /cc'd @aqrln as he was the one who added it there. I just wanted to discuss it here before creating an issue/changing it there as I have missed that change when it was committed.

belochub commented 6 years ago

@lundibundi, there is a way to not use parentheses with this rule, we just have to make sure that function body begins on the same line as it's description, so that '=>' is not immediately followed by a line break.

aqrln commented 6 years ago

I added the rule when it became available in ESLint because that had already been the house style throughout the org, with JSTP, probably, being the only exception, and I'm pretty sure @tshemsedinov was in favor of this style strongly.

aqrln commented 6 years ago

That said, I personally have no strong opinion one way or the other, and consistency within the org was the sole motivation. Today I'd rather just use Prettier, tbh.

nechaido commented 6 years ago

@lundibundi @aqrln PTAL.

belochub commented 6 years ago

Landed in https://github.com/metarhia/jstp/commit/f530d5c076371b5acbe449103f68022de2a37e23.