🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@mdjermanovic
Copy link
Member

Prerequisites checklist

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

[X] Bug fix

fixes #12570

What changes did you make? (Give an overview)

Changed arrow-parens rule:

  • Refactored the code.
  • Changed the way it finds opening paren of params to, I believe, the most reliable one. This should prevent crashes, invalid autofixes, and some false positives in typescript code.
  • Added check for unexpected tokens before opening paren. This should prevent false positives like <T>(a) => b with "as-needed" option.
  • Also fixed an autofix bug with adjacent tokens, unrelated to typescript.

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 Jul 1, 2020
@kaicataldo kaicataldo merged commit ada2c89 into master Jul 3, 2020
@kaicataldo kaicataldo deleted the issue12570 branch July 3, 2020 19:50
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Dec 31, 2020
@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 Dec 31, 2020
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.

arrow-parens crashes when parsing typescript function with generics

3 participants