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

tools: refactor for arrow callbacks and trailing commas #26394

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Mar 2, 2019

First commit:

tools: refactor tools JS code

* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays

Second commit:

tools: apply stricter linting to tools directory

Enable ESLint rules for trailing commas and arrow callbacks in tools
directory. These rules are also in place in the benchmark directory.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Trott added 2 commits March 1, 2019 22:47
* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays
Enable ESLint rules for trailing commas and arrow callbacks in tools
directory. These rules are also in place in the benchmark directory.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Mar 2, 2019
@Trott
Copy link
Member Author

Trott commented Mar 2, 2019

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 2, 2019
process.on('exit', function() {
fs.closeSync(fd);
});
process.on('exit', () => { fs.closeSync(fd); });
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
process.on('exit', () => { fs.closeSync(fd); });
process.on('exit', () => fs.closeSync(fd));

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer it with { and } because it makes it clear that the function is not returning a value.

@Trott
Copy link
Member Author

Trott commented Mar 4, 2019

Landed in c7e628f...20c2ca8

@Trott Trott closed this Mar 4, 2019
Trott added a commit to Trott/io.js that referenced this pull request Mar 4, 2019
* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays

PR-URL: nodejs#26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Trott added a commit to Trott/io.js that referenced this pull request Mar 4, 2019
Enable ESLint rules for trailing commas and arrow callbacks in tools
directory. These rules are also in place in the benchmark directory.

PR-URL: nodejs#26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Mar 12, 2019
* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays

PR-URL: nodejs#26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Mar 12, 2019
Enable ESLint rules for trailing commas and arrow callbacks in tools
directory. These rules are also in place in the benchmark directory.

PR-URL: nodejs#26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@Trott Trott deleted the refactor-tools branch January 13, 2022 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants