Skip to content

Conversation

@adaxi
Copy link

@adaxi adaxi commented Jan 8, 2018

I suggest adding standardjs for code formatting. Main reasons are described at https://standardjs.com/

  • No configuration. The easiest way to enforce consistent style in your project. Just drop it in.
  • Automatically format code. Just run standard --fix and say goodbye to messy or inconsistent code.
  • Catch style issues & programmer errors early. Save precious code review time by eliminating back-and-forth between reviewer & contributor..

A git hook was added to ensure that the conventions are respected.

The changes in this merge request were mostly done by the --fix option of the standard tool.
Some linter exceptions were added to ensure no logic change in this merge request. In the future these exceptions should be removed and the underlying issues should be fixed:

Other than that == was used instead of === and some variables were re-declared in the same scope.

adaxi added 2 commits January 8, 2018 22:44
A git hook was added to ensure that the conventions are respected.
The work was mostly done by the --fix option of the 'standard' tool.
Some linter exceptions were added to ensure minimal changes to the code:
- Buffer.from should not be used anymore: standard/standard#693
- Errors were not handled in some cases
- Global variables: log, config ...
- callback(true) is not recommended: standard/standard#623

Other than that '==' was used instead of '===' and some variables were redeclared in the same scope.
@adaxi adaxi closed this Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant