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

doc: use prefer-rest-params eslint rule in docs #13389

Closed
wants to merge 1 commit into from
Closed

doc: use prefer-rest-params eslint rule in docs #13389

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Jun 2, 2017

Checklist
Affected core subsystem(s)

doc, tools

Do not promote using of arguments.

One fragment is left as is because of history nature: it uses a real deprecated code from libs.

Refs: http://eslint.org/docs/rules/prefer-rest-params
Refs:

node/lib/util.js

Lines 1002 to 1006 in 99da8e8

exports.puts = internalUtil.deprecate(function() {
for (var i = 0, len = arguments.length; i < len; ++i) {
process.stdout.write(arguments[i] + '\n');
}
}, 'util.puts is deprecated. Use console.log instead.', 'DEP0027');

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jun 2, 2017
@vsemozhetbyt
Copy link
Contributor Author

Do not promote using of `arguments`.

One fragment is left as is because of history nature:
it uses a real deprecated code from libs.

Refs: http://eslint.org/docs/rules/prefer-rest-params
Refs: https://github.com/nodejs/node/blob/99da8e8e02a874a0a044889f863c45700509d02c/lib/util.js#L1002-L1006
@vsemozhetbyt
Copy link
Contributor Author

Added \n in debug() function outputs for readability.

New linter CI: https://ci.nodejs.org/job/node-test-linter/9545/

@@ -55,6 +55,7 @@ added: v0.8.0
The `util.deprecate()` method wraps the given `function` or class in such a way that
it is marked as deprecated.

<!-- eslint-disable prefer-rest-params -->
Copy link
Member

Choose a reason for hiding this comment

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

does this need a matching eslint-enable after the code block?

Copy link
Contributor Author

@vsemozhetbyt vsemozhetbyt Jun 2, 2017

Choose a reason for hiding this comment

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

If I get this right, these comments should relate only to the following block:

https://github.com/eslint/eslint-plugin-markdown#configuration-comments

There are some issues though:

eslint/markdown#69

I hope this will be fixed soon.

@vsemozhetbyt
Copy link
Contributor Author

Landed in ce8bce4

@vsemozhetbyt vsemozhetbyt deleted the prefer-rest-params branch June 5, 2017 11:30
vsemozhetbyt added a commit that referenced this pull request Jun 5, 2017
Do not promote using of `arguments`.

One fragment is left as is because of history nature:
it uses a real deprecated code from libs.

Refs: http://eslint.org/docs/rules/prefer-rest-params
Refs: https://github.com/nodejs/node/blob/99da8e8e02a874a0a044889f863c45700509d02c/lib/util.js#L1002-L1006

PR-URL: #13389
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
jasnell pushed a commit that referenced this pull request Jun 5, 2017
Do not promote using of `arguments`.

One fragment is left as is because of history nature:
it uses a real deprecated code from libs.

Refs: http://eslint.org/docs/rules/prefer-rest-params
Refs: https://github.com/nodejs/node/blob/99da8e8e02a874a0a044889f863c45700509d02c/lib/util.js#L1002-L1006

PR-URL: #13389
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
@jasnell jasnell mentioned this pull request Jun 5, 2017
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants