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

Refactor: convert all functions to arrow functions #5894

Closed

Conversation

queengooborg
Copy link
Contributor

@queengooborg queengooborg commented Mar 27, 2020

This PR is a subset of #5654 and #5655 (and partially #5252 (comment)). This PR converts all functions from the older function foo(arg, bar) {} syntax to the const foo = (arg, bar) => {} syntax like most of the functions throughout BCD's scripts.

@queengooborg queengooborg requested a review from ddbeck March 27, 2020 02:33
@queengooborg queengooborg requested a review from Elchi3 as a code owner March 27, 2020 02:33
@ghost ghost added linter Issues or pull requests regarding the tests / linter of the JSON files. scripts Issues or pull requests regarding the scripts in scripts/. labels Mar 27, 2020
@queengooborg queengooborg mentioned this pull request Mar 27, 2020
23 tasks
@ghost ghost added the bulk_update An update to a mass amount of data, or scripts/linters related to such changes label Mar 28, 2020
@ddbeck
Copy link
Collaborator

ddbeck commented Mar 31, 2020

this moves all functions to the top level for code quality purposes

This needs to be at least a separate commit, if not a separate PR. function and => have different semantics, so it's potentially two material changes, if the move happens at the same time. That'll be hard to review otherwise.

Please forgive me for being a broken record on this sort of thing. 😄

@queengooborg queengooborg changed the title Refactor: convert all functions to top-level arrow functions Refactor: convert all functions to arrow functions Mar 31, 2020
@queengooborg queengooborg added the not ready This is not yet ready to be merged. It's pending a decision, other PR, or a prerequisite action. label May 6, 2020
@queengooborg queengooborg removed the not ready This is not yet ready to be merged. It's pending a decision, other PR, or a prerequisite action. label May 12, 2020
@ddbeck ddbeck removed their request for review September 8, 2020 14:12
@queengooborg queengooborg requested a review from ddbeck as a code owner October 8, 2020 22:24
@ddbeck ddbeck self-assigned this Oct 27, 2020
@ddbeck
Copy link
Collaborator

ddbeck commented Oct 29, 2020

Hi Vinyl, thank you for opening this PR, but I'm going to close it. I'm not really happy about it, but I think it's hard to do otherwise. I think the spirit and effect of these changes are probably good in isolation, but as a big PR that touches so many files for what's substantially a style concern, it feels both risky and difficult to review.

However, I do recognize that this inches us toward #5252. My take on ESLint is that I would still like to start applying its recommendations to our code base, but I think we'll have to do it in really tiny, tiny steps (e.g., going file by file, or maybe even error by error).

Thanks for your understanding on this! 🙏

@ddbeck ddbeck closed this Oct 29, 2020
@ddbeck ddbeck removed request for Elchi3 and ddbeck October 29, 2020 10:07
@ddbeck ddbeck removed their assignment Nov 4, 2020
@queengooborg queengooborg deleted the refactor/arrow-functions branch June 8, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bulk_update An update to a mass amount of data, or scripts/linters related to such changes linter Issues or pull requests regarding the tests / linter of the JSON files. scripts Issues or pull requests regarding the scripts in scripts/.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants