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

lib: code style and optimization proposals #244

Closed tshemsedinov closed 7 years ago

tshemsedinov commented 7 years ago

About eslint message Unexpected parentheses around single function argument having a body with no curly braces arrow-parens: I propose to use () around single argument when we declare method or it have multi-line body, it's for readability. If we pass lambda as parameter and it's short we fon't need () of course.

belochub commented 7 years ago

@tshemsedinov, this eslint rule was discussed and added in https://github.com/metarhia/jstp/pull/122, check out that thread. How exactly do you propose to change this rule in .eslintrc file?

tshemsedinov commented 7 years ago

@belochub thanks, may eslint detect multi-line lambdas?

tshemsedinov commented 7 years ago

Reverted change: lambda wrappers on export are back again

lundibundi commented 7 years ago

@tshemsedinov can you please use 'fixup' for incremental changes in the PR as it's very hard to understand the exact changes after force-push especially in somewhat big PRs?

aqrln commented 7 years ago

Landed in 45bb40f14a4dcd91c778b457ddb7b0a18db843b5.