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

[New Rule] vue/no-console #2155

Closed
wenfangdu opened this issue May 12, 2023 · 1 comment · Fixed by #2194
Closed

[New Rule] vue/no-console #2155

wenfangdu opened this issue May 12, 2023 · 1 comment · Fixed by #2194

Comments

@wenfangdu
Copy link
Contributor

Please describe what the rule should do:

Since Vue ^3.3 now supports console in the template, a vue/no-console rule is needed to regulate its usage.

vue/no-console should work exactly the same as no-console but in the template.

What category should the rule belong to?

[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

With 'vue/no-console': 'error', the following code should throw:

<template>
  <button @click="console.log"></button>
</template>
@ota-meshi
Copy link
Member

Thank you for the rule proposal!
That rule sounds good to me.

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

Successfully merging a pull request may close this issue.

2 participants