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