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 to more specific function types #5363

Merged
merged 1 commit into from Jun 8, 2021
Merged

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Jun 8, 2021

Which issue, if any, is this issue related to?

A part of #4496

Is there anything in the PR that needs further explanation?

This refactoring makes abstract function types more specific, such as just Function.
I believe this will help code changes for ESM.

Note:

This refactoring makes abstract function types more specific, such as just `Function`.
I believe this will help code changes for ESM.

A part of #4496
@@ -24,11 +26,11 @@ function isContainerNode(node) {
* executes a provided function once for each declaration block.
*
* @param {Root | Document} root - root element of file.
* @param {function} cb - Function to execute for each declaration block
Copy link
Member Author

Choose a reason for hiding this comment

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

[note] The name cb seems a bit confusing to me.

* @returns {void}
*/
module.exports = function (options, callback) {
module.exports = function checkAgainstRule(options, callback) {
Copy link
Member Author

Choose a reason for hiding this comment

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

[note] Naming a function seems good to me for clarity.

@ybiquitous ybiquitous marked this pull request as ready for review June 8, 2021 15:10
Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

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

🔥

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Thank you!

@jeddy3 jeddy3 merged commit 54e4165 into v14 Jun 8, 2021
@jeddy3 jeddy3 deleted the refactor-function-types branch June 8, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants