GravityProject/gravity

Trailing space

Closed this issue ยท 15 comments

Trailing space creates some problem -

collections/messages.js:80:7: Trailing spaces not allowed.
collections/messages.js:81:5: "Messages" is not defined.
collections/messages.js:81:47: Unnecessarily quoted property
conversation found.
collections/messages.js:86:7: Trailing spaces not allowed.
collections/messages.js:87:5: Expected space or tab after // in
comment.
collections/messages.js:88:5: Keyword "if" must be followed by
whitespace.
collections/messages.js:91:7: Trailing spaces not allowed.
collections/messages.js:92:5: Expected space or tab after // in
comment.
collections/messages.js:92:35: Trailing spaces not allowed.
collections/messages.js:93:5: Keyword "if" must be followed by
whitespace.
collections/messages.js:93:8: "Messages" is not defined.
collections/messages.js:96:5: Trailing spaces not allowed.
collections/messages.js:97:5: Expected space or tab after // in
comment.
collections/messages.js:98:9: conversation is never modified, use
const instead.
collections/messages.js:98:24: "Messages" is not defined.
collections/messages.js:99:7: Trailing spaces not allowed.
collections/messages.js:100:5: Keyword "for" must be followed by
whitespace.
collections/messages.js:101:7: Keyword "if" must be followed by
whitespace.

@zaverichintan I can look into this, what were you doing when this occurred?

This occurred when I was running the app by cmd command - " meteor ".
Do we have rules on our code editor like no trailing spaces?

Ok, so it didn't crash or throw an error when you were using it then?

That's a good question, @pmuens would probably know.

No, it works perfectly.
But it's a discipline that can be implemented.

We have a linter which checks your code constantly.

I prefer training spaces at the end of the file. What about you guys?

EOF is ok.
But why does meteor throw warning/errors?

I can easily fix the spacing warnings later today

That's great. To reproduce, try to make one dir, clone it and run meteor by - 'meteor'.
There is a whole list of errors that I couldn't attach.
You can do use atom editor with remove trailing space option. Or u might even use github command to remove white space

I was just going to add the white spaces, I wasn't going to change the linter settings. I'll let @pmuens adjust the linting settings to what he wants.

Great ๐Ÿ‘
Thanks

I got rid of a lot of the warnings from the linter, but there still are a lot left. @pmuens any idea how to get rid of these:
- Definition for rule 'prefer-template' was not found
- Definition for rule 'prefer-arrow-callback' was not found
- Definition for rule 'no-dupe-class-members' was not found

They are on most pages so maybe if the linter can be configured to ignore those that would get rid of more of the warnings also.

After changing linter, we can make a contributor'guide later on, so tha new contributors can easily contributing.

That's a good idea! Thank you guys for the contributions so far!

#106
Done, added details for space usage

Awesome! Thank you!