GravityProject / gravity

Open source social network built with Meteor
MIT License
131 stars 62 forks source link

Trailing space #104

Closed zaverichintan closed 8 years ago

zaverichintan commented 8 years ago

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.

mattvella07 commented 8 years ago

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

zaverichintan commented 8 years ago

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

mattvella07 commented 8 years ago

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.

zaverichintan commented 8 years ago

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

pmuens commented 8 years ago

We have a linter which checks your code constantly.

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

zaverichintan commented 8 years ago

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

mattvella07 commented 8 years ago

I can easily fix the spacing warnings later today

zaverichintan commented 8 years ago

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

mattvella07 commented 8 years ago

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.

pmuens commented 8 years ago

Great :+1: Thanks

mattvella07 commented 8 years ago

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:

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.

zaverichintan commented 8 years ago

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

pmuens commented 8 years ago

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

zaverichintan commented 8 years ago

https://github.com/GravityProject/gravity/pull/106 Done, added details for space usage

pmuens commented 8 years ago

Awesome! Thank you!