
当 ESLint 最初创建时,其理念是拥有一套小型的 20-30 条核心规则,帮助每个人入门,然后让社区构建自己的规则来填补任何剩余的空白。然而,我们确实继续实现核心规则,因为这似乎很有帮助,以至于如今已有 280 条核心规则。在任何时候,超过一半的未解决问题和拉取请求都与占用团队大量时间的规则相关。
🌐 When ESLint was first created, the idea was to have a small set of 20-30 core rules that could get everyone started, and then to let the community build out its own rules to fill in any remaining gaps. We did, however, continue implementing core rules as it seemed helpful to the point where today there are 280 core rules. At any given time, more than half of open issues and pull requests are related to rules that take up a significant portion of the team’s time.
ESLint 现在得益于一个繁荣的以规则为中心的插件生态系统,如 eslint-plugin-node、eslint-plugin-import、eslint-plugin-react 以及其他许多插件。像 astexplorer.net 这样的工具和众多教程,使开发者编写自己的规则比以往任何时候都容易。核心团队不再需要建立大量的基础规则,因此我们可以将时间优先用于长期期待的核心功能,如将造福整个社区的并行检查。我们正在对内置规则的变更优先级进行一些调整,但一如既往,如果某个规则不完全适合你的情况,鼓励你将其修改为自定义规则以供自己的项目使用,并与社区其他成员共享。
🌐 ESLint now benefits from a thriving ecosystem of rule-focused plugins like eslint-plugin-node, eslint-plugin-import, eslint-plugin-react, and many others. Tools like astexplorer.net and numerous tutorials have made it easier than ever for developers to write their own rules. The core team no longer needs to build up a critical mass of basic rules, so we can prioritize our time on long-awaited core features like parallel linting that will benefit the whole community. We’re making some changes to how we prioritize changes to built-in rules, but as always, if a rule isn’t quite right for your situation, you’re encouraged to modify it as a custom rule for your own project and share it with the rest of the community.
有哪些变化?
🌐 What are the changes?
今后,我们将对处理规则问题和拉取请求的方式进行以下更改:
🌐 Going forward, we’re making the following changes to how we deal with rule issues and pull requests:
- 新规则有限 - 我们只会接受与在过去 12 个月内达到第 4 阶段的新 ECMAScript 特性相关的新规则。社区依赖 ESLint 来帮助他们学习正确使用新语言特性的方法,我们希望继续做到这一点。我们不会接受与新 ECMAScript 特性无关的建议或偏好的新规则。
- 没有仅禁止语法的新规则 - 我们已经有
no-restricted-syntax,它应该适用于大多数情况。否则,人们可以创建自己的规则。我们确实有一些仅禁止语法的遗留规则(例如no-undefined),我们将保留它们,但不会再添加新的规则。 - 风格规则已冻结 - 我们不会再为风格规则添加任何选项。我们已经了解到,没有办法满足每个人的个人偏好,而且大多数规则已经有很多难以理解的选项。风格规则是指与间距、惯例相关的规则,以及一般任何不涉及突出错误或更好做法的内容。2021-01-29 更新:我们在自述文件中澄清,我们仍将支持新添加的 ECMAScript 功能。
- 新的规则选项必须由社区成员实现 - 人们仍然可以为现有的核心非风格规则提出新选项,我们仍将像往常一样评估它们。然而,这些被批准的选项需要由社区实现,并且不会成为核心团队的开发路线图的一部分。
虫子怎么办?
🌐 What about bugs?
我们仍将评估所有核心规则,包括风格规则,以查找漏洞。如果漏洞可以被验证,我们仍会将其作为正常维护程序的一部分进行修复。
🌐 We will still be evaluating all core rules, including stylistic rules, for bugs. If a bug can be verified, we will still fix it as part of our normal maintenance routine.
感谢你的理解
🌐 Thanks for your understanding
我们知道这是对 ESLint 操作方式的一个变更,感谢你的理解。ESLint 由一名兼职开发者和一组志愿者维护,因此我们的精力有限。我们正在进行这些变更,以更好地利用我们可用于维护项目的时间。如果你希望帮助我们,请考虑为项目做出贡献或捐款。
🌐 We know this is a change to how ESLint is operating, and we appreciate your understanding. ESLint is maintained by one part-time developer and a team of volunteers, and so our bandwidth is limited. We’re making these changes to make better use of the time we have available to maintain the project. If you’d like to help us, please consider contributing to the project or making a donation.
