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: add test case for no-func-assign (refs #13705) #13783

Merged
merged 2 commits into from Oct 22, 2020
Merged

Chore: add test case for no-func-assign (refs #13705) #13783

merged 2 commits into from Oct 22, 2020

Conversation

snitin315
Copy link
Contributor

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 autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ X ] Other, please explain: - test

What changes did you make? (Give an overview)

Refers #13705

Added test cases for no-func-assign.

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

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Oct 22, 2020
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion chore This change is not user-facing and removed triage An ESLint team member will look at this issue soon labels Oct 22, 2020
@mdjermanovic
Copy link
Member

Thanks for the PR!

For the context, no-func-assign checks named function expressions from the start, although it seems that it was meant to check function declarations only. There were no test cases and no documented examples with named function expressions.

Either way, it does make sense to check named function expressions in this rule. This PR adds a test to confirm the actual behavior and make sure it won't change.

The documentation update is in #13777.

tests/lib/rules/no-func-assign.js Outdated Show resolved Hide resolved
@mdjermanovic
Copy link
Member

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 17cc0dd into eslint:master Oct 22, 2020
@snitin315 snitin315 deleted the tests/no-func-assign branch October 22, 2020 14:40
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Apr 21, 2021
@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 Apr 21, 2021
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 chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants