javascript-tutorial / javascript-tutorial/en.javascript.info
Misleading coding style practice
還沒有人認領這個 Issue。
- 主要語言
- HTML
- 星號
- 25.5k
- 分支
- 4k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從連結的 javascript.info URL 中的編碼風格文章開始,並結合 ESLint logical-assignment-operators 範例,檢視文章對 linting 工具的說明。釐清 ESLint 規則與 Prettier 等格式化工具之間的區別,並納入連結資源中的相關指引;當文章不再將 linting 僅描述為樣式問題,並準確說明所要求工具的作用時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- eslint, javascript
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100