Skip to content

Code sample issues #9

@bradvogel

Description

@bradvogel

There are a few minor code style inconsistencies:

Spaces in function declaration
function() {

vs

function(){
Missing semi-colons, e.g.
Template.notification.helpers({
   notificationPostPath: function() {
        return Router.routes.postPage.path({_id: this.postId});
   }
})
Single vs double quotes, e.g.
throw new Meteor.Error(401, "You need to login to make comments");
...
throw new Meteor.Error(422, 'Please write some content');
Single line functions vs multiple lines, e.g.
this.route('postPage', {
  path: '/posts/:_id',
  waitOn: function() {
    return Meteor.subscribe('comments', this.params._id); 
  },
  data: function() { return Posts.findOne(this.params._id); }
});
Also, it would be more readable if comments were complete sentences, e.g.
// Display the error to the user.

instead of:

// display the error to the user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions