Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

ES2015 refactor #6

Merged
merged 10 commits into from
Jan 26, 2018
Merged

ES2015 refactor #6

merged 10 commits into from
Jan 26, 2018

Conversation

owenvoke
Copy link
Contributor

@owenvoke owenvoke commented Jan 26, 2018

This PR applies a couple of changes regarding ES2015 (ES6) syntaxing.

  • Update to use ES2015/16 syntax
  • Change to use a constant for the API URL
  • Fix the consistency of quotes (opted for singe quotes)
  • Fixed whitespace consistency

This follows the Javascript Standard Style.

Feel free to make any edits to this, or request any changes. 馃憤


Closes #5

In ES2015/16, semicolons are recommended although not required. To
keep the project consistent, this change adds missing semicolons.
This changes the whitespace in main.js to be consistent across the
various functions and removes unnecessary whitespace.
ES2015/16 uses `let` and `const` instead of `var`. This change
replaces all uses of `var` with the corresponding alternative.
Changed to use a constant for the API url so that it can be used in
multiple places easily if needed.
This change alters some ES2015 syntax:
- Use backticks for string concatenation containing variables
- Move uses of `let` onto one line per definition
- Change to use arrow function

See: GitHub issue hill#5
See: https://goo.gl/8ZeEdS
Fixed the style of quotes for the Javascript Standard Style for
consistency. Also removed trailing commas.

See: https://standardjs.com
@hill hill merged commit 7c633e0 into hill:master Jan 26, 2018
@owenvoke owenvoke deleted the feature/es2015-refactor branch January 26, 2018 22:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants