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

Add Javascript #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Javascript #3

wants to merge 3 commits into from

Conversation

luissifu
Copy link
Contributor

@luissifu luissifu commented Nov 29, 2019

Adds documentation for javascript, including a styleguide and a introduction.

Review using: https://github.com/ecaresoft/guides/tree/60c1eb9ad40433549cb9c9e2779478b6327c4c09

Copy link

@benoror benoror left a comment

Choose a reason for hiding this comment

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

LGTM 😄

Copy link

@jvann jvann left a comment

Choose a reason for hiding this comment

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

LGTM 🙌 GJ @luissifu.

Just some small comments.


### Useful Links
Styleguide
* [Javascript styleguide](styleguide.md)
Copy link

Choose a reason for hiding this comment

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

Comment on lines +72 to +79
const membershipGoldStub = Service.extend({
hasLite: false
});

test('render lock when template is locked for basic user', function(assert) {
this.container.registry.register('service:mockMembership', membershipBasicStub);
// ...
});
Copy link

Choose a reason for hiding this comment

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

Mocking wrong stub membershipGoldStub -> membershipBasicStub please change to basic or gold stub 👍

Source: [Apollo](https://github.com/ecaresoft/apollo/blob/master/app/pods/login/controller.js)

While classes are similar to the other languages, most it's important to understand what the
keywords `import`, `export, and `default` do.
Copy link

Choose a reason for hiding this comment

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

Missing ` after export


## Semicolons

+ Use semicolons`;`
Copy link

Choose a reason for hiding this comment

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

Add => ... Always ? 🤓


## Comments

+ Pad comments with a space.
Copy link

Choose a reason for hiding this comment

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

Maybe explain when to use comments as well?

// good
const isTrue = true;
const bar = 123;
let foo;
Copy link

Choose a reason for hiding this comment

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

Maybe add newline between const and let group?

// good
foo[propertyName];

// do you even javascript
Copy link

Choose a reason for hiding this comment

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

🤣 👍

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.

3 participants