-
Notifications
You must be signed in to change notification settings - Fork 26.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README file - Extend explanations, fix formatting mistakes and expand examples #2938
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick feedback @ljharb
I hope we will be able to incorporate few of my changes.
@ljharb I am still thinking about 19.6 There are actually general ESLint rules regarding method chains formatting but for some reason all examples are about jQuery and DOM manipulation. No pure JS examples of methods chaining for arrays or some objects manipulation. May I reduce quantity of the jQuery examples (or make them less confusing due to the long chains of method calls with different indents) and add some additional examples with bad/good formatting? |
bed075e
to
352c3db
Compare
Hi @ljharb , |
352c3db
to
891cff2
Compare
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
891cff2
to
396251f
Compare
} | ||
|
||
foo() | ||
console.log(bar) // 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(bar) // 10 | |
console.log(bar); // 10 |
bar = 10 // bar will appear in the global scope | ||
} | ||
|
||
foo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
foo() | |
foo(); |
@@ -1646,6 +1653,14 @@ Other Style Guides | |||
// bad | |||
superPower = new SuperPower(); | |||
|
|||
// bad | |||
function foo() { | |||
bar = 10 // bar will appear in the global scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bar = 10 // bar will appear in the global scope | |
bar = 10; // bar will appear in the global scope |
I am author of few JavaScript courses on Udemy.
While recording new JavaScript course I used AirBnb Style Guide in one of the sections and noticed few ways for improvements.