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: Remove ESLint disable comments which were breaking the CJS/ESM code block toggles #40408

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions doc/api/assert.md
Expand Up @@ -958,7 +958,6 @@ function. See [`assert.throws()`][] for more details.
Besides the async nature to await the completion behaves identically to
[`assert.doesNotThrow()`][].

<!-- eslint-disable no-restricted-syntax -->
```mjs
import assert from 'assert/strict';

Expand All @@ -983,7 +982,6 @@ const assert = require('assert/strict');
})();
```

<!-- eslint-disable no-restricted-syntax -->
```mjs
import assert from 'assert/strict';

Expand All @@ -993,7 +991,6 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
});
```

<!-- eslint-disable no-restricted-syntax -->
```cjs
const assert = require('assert/strict');

Expand Down Expand Up @@ -1042,7 +1039,6 @@ function. See [`assert.throws()`][] for more details.
The following, for instance, will throw the [`TypeError`][] because there is no
matching error type in the assertion:

<!-- eslint-disable no-restricted-syntax -->
```mjs
import assert from 'assert/strict';

Expand All @@ -1054,7 +1050,6 @@ assert.doesNotThrow(
);
```

<!-- eslint-disable no-restricted-syntax -->
```cjs
const assert = require('assert/strict');

Expand All @@ -1069,7 +1064,6 @@ assert.doesNotThrow(
However, the following will result in an [`AssertionError`][] with the message
'Got unwanted exception...':

<!-- eslint-disable no-restricted-syntax -->
```mjs
import assert from 'assert/strict';

Expand All @@ -1081,7 +1075,6 @@ assert.doesNotThrow(
);
```

<!-- eslint-disable no-restricted-syntax -->
```cjs
const assert = require('assert/strict');

Expand All @@ -1097,7 +1090,6 @@ If an [`AssertionError`][] is thrown and a value is provided for the `message`
parameter, the value of `message` will be appended to the [`AssertionError`][]
message:

<!-- eslint-disable no-restricted-syntax -->
```mjs
import assert from 'assert/strict';

Expand All @@ -1111,7 +1103,6 @@ assert.doesNotThrow(
// Throws: AssertionError: Got unwanted exception: Whoops
```

<!-- eslint-disable no-restricted-syntax -->
```cjs
const assert = require('assert/strict');

Expand Down Expand Up @@ -2346,7 +2337,6 @@ message as the thrown error message is going to result in an
`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
a string as the second argument gets considered:

<!-- eslint-disable no-restricted-syntax -->
```mjs
import assert from 'assert/strict';

Expand Down Expand Up @@ -2383,7 +2373,6 @@ assert.throws(throwingFirst, /Second$/);
// AssertionError [ERR_ASSERTION]
```

<!-- eslint-disable no-restricted-syntax -->
```cjs
const assert = require('assert/strict');

Expand Down