Skip to content

Standardize coding style#154

Merged
morleyzhi merged 30 commits intostellar:masterfrom
morleyzhi:mz-codestyle
Feb 4, 2019
Merged

Standardize coding style#154
morleyzhi merged 30 commits intostellar:masterfrom
morleyzhi:mz-codestyle

Conversation

@morleyzhi
Copy link
Copy Markdown
Contributor

@morleyzhi morleyzhi commented Jan 24, 2019

Fixes #153. See also stellar/js-stellar-sdk#221.

  • Add prettier and eslint (replacing jshint)
  • Add pre-commit hook for running prettier
  • Add Airbnb's eslint rules
  • Fix code with linter issues

@bartekn
Copy link
Copy Markdown
Contributor

bartekn commented Jan 25, 2019

Can you fix errors detected in CI before the review?

Comment thread gulpfile.js Outdated
Comment thread package.json
],
"engines": {
"node": ">=4"
"node": ">=6.14.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for 6.14? I think >=6 should be good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint, possibly more tools, only support 6.14 and above. Since built files will be ES5ed, they'll still work on 6.0-6.13, but I guess we could miss some bugs that are fixed in 6.14. But I think that's pretty unlikely.

So the Travis files are set to install 6.14, and that's the version in NPM, so it makes sense to set the engine to the same value, since Babel could in the future use that to determine its transpile target.

Comment thread src/generated/stellar-xdr_generated.js Outdated
Comment thread src/operation.js
Comment thread src/operation.js
Comment thread test/support/io-helpers.js Outdated
@morleyzhi
Copy link
Copy Markdown
Contributor Author

@bartekn All the changes you suggested should be in now, thanks!

@bartekn bartekn changed the base branch from master to exp-next January 29, 2019 22:38
@bartekn
Copy link
Copy Markdown
Contributor

bartekn commented Feb 1, 2019

LGTM but please remove lib before merging.

morleyzhi added a commit to stellar/js-xdr that referenced this pull request Feb 4, 2019
Fixes #24.

See also stellar/js-stellar-base#154 and stellar/js-stellar-sdk#221

-  Add prettier and eslint (replacing jshint)
-  Add pre-commit hook for running prettier
-  Add Airbnb's eslint rules
-  Fix code with linter issues
-  Upgrade to Babel 6
@bartekn bartekn changed the base branch from exp-next to master February 4, 2019 16:04
@morleyzhi morleyzhi merged commit 39b2dc1 into stellar:master Feb 4, 2019
morleyzhi added a commit to stellar/js-stellar-sdk that referenced this pull request Feb 4, 2019
Fixes #220. See also stellar/js-stellar-base#154.

- Add prettier and eslint (replacing jshint)
- Add pre-commit hook for running prettier
- Add Airbnb's eslint rules
- Fix code with linter issues
- Fix jsdoc script
- Travis changes: bump Node version

Documentation needs improving, but that can be done in a later pass.
@morleyzhi morleyzhi deleted the mz-codestyle branch March 7, 2019 16:42
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-12.0%) to 82.188% when pulling ed0668d on morleyzhi:mz-codestyle into 3268b33 on stellar:master.

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.

Add Prettier + Eslint

3 participants