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

ESLint not firing error on console.log? #414

Closed
AcidRaZor opened this issue Dec 28, 2023 · 1 comment
Closed

ESLint not firing error on console.log? #414

AcidRaZor opened this issue Dec 28, 2023 · 1 comment

Comments

@AcidRaZor
Copy link

I've setup a new project using this, to test, I added console.log("") that, I think, should fire at least a warning?

the --fix that's added to the setup here also doesn't seem to fix anything, the only time I get anything to show when running lint is declared variables that's not used.

would love to enforce some code quality but it doesn't seem to work and I've seen people on youtube set this up manually and it's just working. am I missing something?

all config is just from what create-vue does

@sodatea
Copy link
Member

sodatea commented Dec 28, 2023

no-console has been removed from eslint:recommended since ESLint v6 https://eslint.org/docs/latest/use/migrating-to-6.0.0#-eslintrecommended-has-been-updated

While this rule is useful in many cases (e.g. to avoid inadvertently leaving debugging statements in production code), it is not as broadly applicable as the other rules in eslint:recommended, and it was a source of false positives in cases where console.log is acceptable (e.g. in CLI applications).

If you want to enable this rule, please manually configure it in .eslintrc.cjs.

@sodatea sodatea closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2023
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

No branches or pull requests

2 participants