javascript-tutorial / javascript-tutorial/en.javascript.info
Misleading coding style practice
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
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:
- 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.
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the coding style article at the linked javascript.info URL and review its statement about linting tools alongside the ESLint logical-assignment-operators example. Clarify the distinction between ESLint rules and formatting tools such as Prettier, incorporating the relevant guidance from the linked resources; done means the article no longer presents linting as only styling and explains the requested tooling roles accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100