diff --git a/docs/rules/import-style.md b/docs/rules/import-style.md index c5a01ac221..d60d310ef4 100644 --- a/docs/rules/import-style.md +++ b/docs/rules/import-style.md @@ -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 diff --git a/docs/rules/no-array-push-push.md b/docs/rules/no-array-push-push.md index 035f805517..d3b924b609 100644 --- a/docs/rules/no-array-push-push.md +++ b/docs/rules/no-array-push-push.md @@ -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'); diff --git a/docs/rules/no-process-exit.md b/docs/rules/no-process-exit.md index 1cdcb4271d..60e6a14598 100644 --- a/docs/rules/no-process-exit.md +++ b/docs/rules/no-process-exit.md @@ -28,7 +28,7 @@ process.on('SIGINT', () => { ``` ```js -import workerThreads from 'worker_threads'; +import workerThreads from 'node:worker_threads'; try { // Do something… diff --git a/package.json b/package.json index 11bd5e1acf..3a8b053982 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "url": "https://sindresorhus.com" }, "main": "index.js", + "sideEffects": false, "engines": { "node": ">=16" }, diff --git a/rules/shared/abbreviations.js b/rules/shared/abbreviations.js index 4e0e6d6a75..60b57bd238 100644 --- a/rules/shared/abbreviations.js +++ b/rules/shared/abbreviations.js @@ -182,6 +182,7 @@ module.exports.defaultReplacements = { res: { response: true, result: true, + resource: true, }, ret: { returnValue: true,