Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 21, 2023
1 parent 85bce3f commit 2a2240a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/rules/import-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ This rule defines 4 import styles:
## Fail

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

import util from 'util';
import util from 'node:util';

import * as util from 'util';
import * as util from 'node:util';
```

## Pass

```js
const {promisify} = require('util');
const {promisify} = require('node:util');

import {promisify} from 'util';
import {promisify} from 'node:util';
```

## Options
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-array-push-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Example:

```js
// eslint unicorn/no-array-push-push: ["error", {"ignore": ["readable"]}]
const {Readable} = require('stream');
import {Readable} from 'node:stream';

const readable = new Readable();
readable.push('one');
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-process-exit.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ process.on('SIGINT', () => {
```

```js
import workerThreads from 'worker_threads';
import workerThreads from 'node:worker_threads';

try {
// Do something…
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"url": "https://sindresorhus.com"
},
"main": "index.js",
"sideEffects": false,
"engines": {
"node": ">=16"
},
Expand Down
1 change: 1 addition & 0 deletions rules/shared/abbreviations.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ module.exports.defaultReplacements = {
res: {
response: true,
result: true,
resource: true,
},
ret: {
returnValue: true,
Expand Down

0 comments on commit 2a2240a

Please sign in to comment.