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

lint: change require-buffer rule message #19701

Closed

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Mar 30, 2018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Mar 30, 2018
@devsnek
Copy link
Member Author

devsnek commented Mar 30, 2018

@vsemozhetbyt vsemozhetbyt added the buffer Issues and PRs related to the buffer subsystem. label Mar 30, 2018
@@ -4,8 +4,7 @@ const BUFFER_REQUIRE = 'const { Buffer } = require(\'buffer\');\n';
module.exports = function(context) {

function flagIt(reference) {
const msg = 'Use const Buffer = require(\'buffer\').Buffer; ' +
'at the beginning of this file';
const msg = `Use ${BUFFER_REQUIRE} at the beginning of this file`;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: BUFFER_REQUIRE adds a new line, is this wanted?

Copy link
Member Author

Choose a reason for hiding this comment

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

fantastic catch, thank you :)

Copy link
Member

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

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

LGTM, but this needs a CI-lite re-run prior to landing.

@devsnek
Copy link
Member Author

devsnek commented Apr 1, 2018

@devsnek
Copy link
Member Author

devsnek commented Apr 3, 2018

landed in 5579118

@devsnek devsnek closed this Apr 3, 2018
@devsnek devsnek deleted the update-eslint-require-buffer-message branch April 3, 2018 04:13
devsnek added a commit that referenced this pull request Apr 3, 2018
PR-URL: #19701
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Apr 3, 2018
PR-URL: #19701
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos mentioned this pull request Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants