eslint / eslint

Find and fix problems in your JavaScript code.
https://eslint.org
MIT License
24.44k stars 4.41k forks source link

feat: Add suggestions to no-console #17680

Closed Rec0iL99 closed 6 months ago

Rec0iL99 commented 7 months ago

Fixes #17493

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update [ ] Bug fix (template) [ ] New rule (template) [x] Changes an existing rule (template) [ ] Add autofix to a rule [ ] Add a CLI option [ ] Add something to the core [ ] Other, please explain:

What changes did you make? (Give an overview)

Added suggestions to the no-console rule. Added appropriate tests too.

Incorporated feedback from https://github.com/eslint/eslint/pull/17542#discussion_r1319839007.

Is there anything you'd like reviewers to focus on?

linux-foundation-easycla[bot] commented 7 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

netlify[bot] commented 7 months ago

Deploy Preview for docs-eslint canceled.

Name Link
Latest commit e12d3bca44fed8f4103cbdcaaff6c289be2a6d65
Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/6556baa474e77700081db390
nzakas commented 7 months ago

Heads up: there are linting and testing errors on the PR. You may want to try rebasing on top of main to see if that clears up some of the issues.

Rec0iL99 commented 7 months ago

Heads up: there are linting and testing errors on the PR. You may want to try rebasing on top of main to see if that clears up some of the issues.

Not sure why tests are failing after the rebase too :(

mdjermanovic commented 7 months ago

Not sure why tests are failing after the rebase too :(

Probably due to changes in the recently released Acorn 8.11. I'll try to make a minimal repro and submit an issue to the acorn repo.

mdjermanovic commented 7 months ago

Okay, the problem that caused some indent rule tests to fail has been fixed in Acorn 8.11.2 so those tests are passing now.

Now there's only the other problem, one test failing in Node 21.1.0. This will be fixed by https://github.com/eslint/eslint/pull/17683.

mdjermanovic commented 7 months ago

I'll close-reopen this just to update the merge ref and run CI again with the latest changes from the main branch.

edi9999 commented 6 months ago

Awesome @Rec0iL99 ! Let me know if you are in Paris one day, I owe you a meal :)

Rec0iL99 commented 6 months ago

😁 Deal!