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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ rules:
# add new ECMAScript features gradually
no-var: 2
prefer-const: 2
prefer-rest-params: 2
4 changes: 2 additions & 2 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ not invoke AsyncHooks recursively because it is synchronous.
const fs = require('fs');
const util = require('util');

function debug() {
function debug(...args) {
// use a function like this one when debugging inside an AsyncHooks callback
fs.writeSync(1, util.format.apply(null, arguments));
fs.writeSync(1, `${util.format(...args)}\n`);
}
```

Expand Down
1 change: 1 addition & 0 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```js
const util = require('util');

Expand Down