Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console 允许 error 和 info 级别 #22

Closed
cyseria opened this issue Dec 16, 2020 · 3 comments · Fixed by #24
Closed

console 允许 error 和 info 级别 #22

cyseria opened this issue Dec 16, 2020 · 3 comments · Fixed by #24

Comments

@cyseria
Copy link
Contributor

cyseria commented Dec 16, 2020

对于 strict,目前 no-console 的规则为 'error',默认为 warn。

个人感觉 console.info, warn, error 等这种应该允许存在的,而不是一律不给书写。
因为这种很可能是 "故意在代码中留下的",为了提供必要的 debug 所需信息,特别是基础库。

因此建议修改规则为:

'no-console': ['warn', {allow: ['warn', 'error', 'info']}]
@otakustay
Copy link
Member

我认为OK,你发PR还是我们找个时间改

1 similar comment
@otakustay
Copy link
Member

我认为OK,你发PR还是我们找个时间改

@cyseria
Copy link
Contributor Author

cyseria commented Dec 23, 2020

我认为OK,你发PR还是我们找个时间改

这周晚点 pr 吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants