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

Fix: no-undef-init should not apply to class fields (refs #14857) #14994

Merged
merged 2 commits into from Sep 2, 2021

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

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

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

refs #14857, #14591 (comment)

What changes did you make? (Give an overview)

Fixed the no-undef-init rule to not apply to class fields.

This reverts changes in this rule made in #14591:

I also added one valid test to confirm that this rule no longer applies to class field.

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

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion labels Aug 30, 2021
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 30, 2021

CLA Signed

The committers are authorized under a signed CLA.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

Code LGTM. Can we also update the docs to make it clear this doesn’t apply to class fields?

@mdjermanovic
Copy link
Member Author

Updated the docs to clarify what's being checked by this rule and what isn't.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM

@mdjermanovic mdjermanovic merged commit e9764f3 into master Sep 2, 2021
@mdjermanovic mdjermanovic deleted the noundefinit-classfields branch September 2, 2021 16:14
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Mar 2, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants