Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Update Project to have ES6 Conventions #84

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

jasecode
Copy link
Contributor

Status: Ready for Review or Open for Visibility
Owner:
Reviewers: @ellenmobify @jasecode

Changes

  • Add ES6 Linter via Mobify Code Style
  • Updated commands to be in ES6 format

Todos:

  • Passed linting check (run grunt lint)
  • Updated README
  • Updated CHANGELOG

Feedback:

none so far

How To Test

  • Checkout this branch
  • npm install
  • npm link
  • npm run lint


exports.command = function(url, bundle, callback) {
var browser = this;
exports.command = function(url, bundle = 'https://localhost:8443/loader.js', callback) {
Copy link

Choose a reason for hiding this comment

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

Now that you're using es6 everything, do you still need to create the exports object? Or can you just say:

export const command = function(...)

Also, while you're at it, can you use an arrow function here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed. Unfortunately we're unable to use an arrow function due to losing the ability to call 'argument.lengths'.

@@ -1,13 +1,13 @@
exports.command = function(selector, callback) {
Copy link

Choose a reason for hiding this comment

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

Same comment about exports here

"test": "./node_modules/.bin/grunt lint; ./node_modules/.bin/grunt test"
"test": "./node_modules/.bin/grunt lint; ./node_modules/.bin/grunt test",
"lint": "npm run lint:js",
"lint:js": "eslint '**/*.{js,jsx}'"
Copy link

Choose a reason for hiding this comment

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

Might want to double check that this blob works on Windows. I've run into issues with commands before where the quotes used for this mattered to Windows and broke things. 😞

@@ -20,7 +24,9 @@
},
"scripts": {
"install": "node selenium/install.js",
"test": "./node_modules/.bin/grunt lint; ./node_modules/.bin/grunt test"
"test": "./node_modules/.bin/grunt lint; ./node_modules/.bin/grunt test",
Copy link

Choose a reason for hiding this comment

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

Should this be ; or &&? I don't actually remember what ; does 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants