Search: .lenght - Github
21–30 of 106 posts
Re: Search: .lenght - Github
#22Re: Search: .lenght - Github
#23I remember seeing a Github bot a couple weeks ago that strips out whitespace and adds a .gitignore file to a repo (I also remember this really rubbing some people the wrong way). This search indicates that it would probably be useful to have a linter bot running on Github for all the popular languages. It would find syntax errors, common mispellings, and compilation issues, and then submit pull requests to fix the is…
Re: Search: .lenght - Github
#24A common typo, it seems. But I'm a bit confused as to why this was submitted.
In JavaScript, if you check for a non-existent property on a variable (e.g. aVar.lenght vs aVar.length) it will return "undefined". So people often rely on this behaviour to check if something is an array or not (no comment on whether this is good or bad), with: if(somethingThatMightBeAnArray.length){ // do things with array } So misspelling of length can be making a lot of code out there behave in an unexpected way.
"bar".length; // 3
Re: Search: .lenght - Github
#25Re: Search: .lenght - Github
#26I remember seeing a Github bot a couple weeks ago that strips out whitespace and adds a .gitignore file to a repo (I also remember this really rubbing some people the wrong way). This search indicates that it would probably be useful to have a linter bot running on Github for all the popular languages. It would find syntax errors, common mispellings, and compilation issues, and then submit pull requests to fix the is…
https://github.com/Miserlou/WhitespaceBot
Feel free to fork it to do whatever you want, that's why I made it.
Re: Search: .lenght - Github
#27Re: Search: .lenght - Github
#28Earlier quoted context omitted.
Perhaps they were using . . . something other than *nix. EDIT: Justly downvoted chastised for attempting humor without understanding.
That command works nicely for me in Cygwin. EDIT: Eh, apologies if this sounded like chastising -- I didn't mean to. As a developer who's been trapped in "Windows-mindset" for many years, I wanted to try to inspire other Windows devs to try to use *nix-based solutions even if their only option is Windows development. Cygwin is in a very good spot right now -- it's achieved so much acceptance that even the most harden…