javascript icon indicating copy to clipboard operation
javascript copied to clipboard

JavaScript Style Guide

Results 167 javascript issues
Sort by recently updated
recently updated
newest added

@ljharb @erights Can you guys let me know if this correct? Thanks! Fixes #1673.

editorial

`WrappedComponent` static property should be added to custom High-Order component to get access to the initial(decorated component). In most cases it would allow to avoid issue [`import/no-named-as-default`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md)

Any project that currently uses eslint-config-airbnb checked out on Windows results in thousands of linter errors since the line endings will be CRLF, making it impossible to contribute to these...

needs eslint rule change/addition

You mention NaN evaluates to false but don't explicitly mention that any comparison to NaN evalutes to false, including NaN === NaN. Added a note about this at the bottom...

needs followup
editorial

Related to #990 I removed the comment "No! We shouldn't mutate function arguments.", because it doesn't add any new information and added a "Why?" quote.

Defaulting omitted variables using `||` is like using `==` instead of `===`. If a function's argument is falsy (`0`, `false`, `null`, `''`...), it will be defaulted while it shouldn't be....

question
needs rebase

E.g. ``` javascript function call(url, timeout = 60) { return request.call(url, {timeout}); } ``` I think that really makes sense. Moreover, that's a JavaScript way - "everything is exposed, except...

question
needs followup
needs rebase

Add section about Short Circuit Evaluation

needs followup
editorial

In the process of forking your amazing style guide and porting across some of the differences in our old internal style guide, we found some additional notes on naming conventions...

needs followup
needs rebase