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

chore: remove creating an unused instance of Linter in tests #17902

Merged
merged 1 commit into from Dec 24, 2023

Conversation

mdjermanovic
Copy link
Member

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)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

In the Linter tests, I removed one linter = new Linter() line. This line creates an instance that ends up being unused because the variable is later assigned a new instance in beforeEach. It just causes confusion about which mode the nearby tests are run in (it took me a while to figure our why those tests still pass after changing the default mode in #17851).

What changes did you make? (Give an overview)

Removed the line.

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

@mdjermanovic mdjermanovic added the chore This change is not user-facing label Dec 24, 2023
@mdjermanovic mdjermanovic requested a review from a team as a code owner December 24, 2023 10:58
Copy link

netlify bot commented Dec 24, 2023

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit a77ae7f
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/65880ecf7358fc000852cdfe

Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@snitin315 snitin315 added the accepted There is consensus among the team that this change meets the criteria for inclusion label Dec 24, 2023
@snitin315 snitin315 merged commit c0f5d91 into main Dec 24, 2023
17 checks passed
@snitin315 snitin315 deleted the tests-unused-linter-instance branch December 24, 2023 16:51
bmish added a commit to bmish/eslint that referenced this pull request Dec 27, 2023
* main:
  docs: Migrate to v9.0.0 (eslint#17905)
  docs: Switch to flat config by default (eslint#17840)
  docs: Update Create a Plugin for flat config (eslint#17826)
  feat!: add two more cases to `no-implicit-coercion` (eslint#17832)
  docs: Switch shareable config docs to use flat config (eslint#17827)
  chore: remove creating an unused instance of Linter in tests (eslint#17902)
  feat!: Switch Linter to flat config by default (eslint#17851)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion chore This change is not user-facing
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

2 participants