You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for making javascript.info, I am learning a lot from it.
I have encounter some issue regarding coding style guide and as I daily visitor of beloved javascript.info
I held responsibility for contributing toward this learning source, so that new developers will not misguided by some mistakes.
on this article
It says Linting tools are for styling while it's completely false
Linting tools like eslint are for setting rules for your code
- friend = friend || "me";
+ friend ||= "me";
Assignment (=) can be replaced with operator assignment (||=).
while formatting tools like prettier are the one used for styling code.
Using Linting tools for styling is bad idea they are very slow because that's not Linting tools job to do.
I recommend Including the learning of above resources in javascript.info coding style section it would be a great help.
you can even make a separate section for it, these things help developers so much.
The text was updated successfully, but these errors were encountered:
@joaquinelio thanks for replying
have you visited the resources that I have listed ?
please watch this video link at 13:11 timestamps
This video is from one of best contributor of typsecript and eslint i.e. JoshuaKGoldberg
Linters and formatters aren't the same.
Linters and formatter works differently .
Most of developers uses prettier for formatting and Eslint rule checking.
Both uses different algorithm, we can use linters for styling but they are slow . The right tool is formatter.
Thanks for making javascript.info, I am learning a lot from it.
I have encounter some issue regarding coding style guide and as I daily visitor of beloved javascript.info
I held responsibility for contributing toward this learning source, so that new developers will not misguided by some mistakes.
on this article
It says Linting tools are for styling while it's completely false
Linting tools like eslint are for setting rules for your code
For example, if you enabled the ESLint logical-assignment-operators rule on the snippet from Formatting, you’d receive a message and suggested fix like:
while formatting tools like prettier are the one used for styling code.
Using Linting tools for styling is bad idea they are very slow because that's not Linting tools job to do.
Please visit these links to know the insights
Configuring ESLint, Prettier, and TypeScript Together
video link
I recommend Including the learning of above resources in javascript.info coding style section it would be a great help.
you can even make a separate section for it, these things help developers so much.
The text was updated successfully, but these errors were encountered: