【文件属性】:
文件名称:eslint-plugin-no-loops:都 2021 年了,你还在用循环吗?
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-29 17:03:34
JavaScript
eslint-plugin-no-loops
都 2021 年了,你还在用循环吗?
安装
npm install --save-dev eslint-plugin-no-loops
用法
在您的.eslintrc :
{
"plugins" : [
"no-loops"
] ,
"rules" : {
"no-loops/no-loops" : 2
}
}
规则
禁止使用循环(for、for-in、while、do-while、for-of)。
为什么
你。
我知道得更多,我现在需要一个
如果您 99% 的代码不需要它们,但是您有一个循环有意义的情况,请继续!
// eslint-disable-next-line no-loops/no-loops
for ( let i = 0 ; i < arr . length ; i ++ ) {
/
【文件预览】:
eslint-plugin-no-loops-master
----ci()
--------test.yml(253B)
--------pipeline.yml(1KB)
--------test.sh(56B)
----lib()
--------no-loops.js(392B)
----LICENSE(1KB)
----README.md(1KB)
----tests()
--------index.js(931B)
----.gitignore(279B)
----index.js(79B)
----package.json(725B)