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: indent for async arrow functions (fixes #13497) #13544

Merged
merged 10 commits into from Aug 14, 2020

Conversation

anikethsaha
Copy link
Member

@anikethsaha anikethsaha commented Aug 2, 2020

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:

What changes did you make? (Give an overview)

fixes #13497

Indent for async arrow function was not working as the first token in the async arrow function node is the async not the opening paren. So the condition here would not be truthy.
So I added one more check for simply checking the type as Identifier and value as async

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

None

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Aug 2, 2020
@anikethsaha anikethsaha added accepted There is consensus among the team that this change meets the criteria for inclusion rule Relates to ESLint's core rules labels Aug 2, 2020
@mdjermanovic mdjermanovic added bug ESLint is working incorrectly and removed triage An ESLint team member will look at this issue soon labels Aug 2, 2020
lib/rules/indent.js Outdated Show resolved Hide resolved
lib/rules/indent.js Outdated Show resolved Hide resolved
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

One fine

Edit: I have no idea what happened here 🤣

lib/rules/indent.js Outdated Show resolved Hide resolved
Copy link
Member

@kaicataldo kaicataldo 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!

lib/rules/indent.js Outdated Show resolved Hide resolved
tests/lib/rules/indent.js Outdated Show resolved Hide resolved
tests/lib/rules/indent.js Outdated Show resolved Hide resolved
Copy link
Member

@mdjermanovic mdjermanovic 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!

lib/rules/indent.js Outdated Show resolved Hide resolved
Copy link
Member

@kaicataldo kaicataldo 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!

Copy link
Member

@aladdin-add aladdin-add 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! 💯

Copy link
Member

@mdjermanovic mdjermanovic 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!

@aladdin-add aladdin-add merged commit 254990e into eslint:master Aug 14, 2020
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 11, 2021
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 11, 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 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.

Indent level (parameters: first) for async arrow functions
4 participants