From 40e723da61b5036fc78e32e94c6dfa616d9ceb1d Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Fri, 15 Sep 2023 17:12:24 -0600 Subject: [PATCH] style: automatic fixes for new ESLint rules Signed-off-by: Kevin Locke --- benchmark/index.js | 5 +++-- benchmark/to-json-no-exponential.js | 3 ++- bin/json-replace-exponentials.js | 2 +- test/bin/json-replace-exponentials.js | 4 ++-- test/index.js | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/benchmark/index.js b/benchmark/index.js index af85ef3..7fc14ef 100755 --- a/benchmark/index.js +++ b/benchmark/index.js @@ -5,9 +5,10 @@ 'use strict'; +const { readFile } = require('node:fs'); +const { promisify } = require('node:util'); + const Benchmark = require('benchmark'); -const { readFile } = require('fs'); -const { promisify } = require('util'); // Note: fs.promises.readFile only accepts FileHandle, not number FD const readFileP = promisify(readFile); diff --git a/benchmark/to-json-no-exponential.js b/benchmark/to-json-no-exponential.js index 4b3562c..47d6345 100644 --- a/benchmark/to-json-no-exponential.js +++ b/benchmark/to-json-no-exponential.js @@ -10,7 +10,8 @@ 'use strict'; -const assert = require('assert'); +const assert = require('node:assert'); + const jsonStringifyRaw = require('json-stringify-raw'); function getFixed(value) { diff --git a/bin/json-replace-exponentials.js b/bin/json-replace-exponentials.js index e4394a1..800d62d 100755 --- a/bin/json-replace-exponentials.js +++ b/bin/json-replace-exponentials.js @@ -12,10 +12,10 @@ 'use strict'; +const jsonReplaceExponentials = require('..'); const packageJson = require('../package.json'); // https://github.com/import-js/eslint-plugin-import/issues/2844 // eslint-disable-next-line import/extensions -const jsonReplaceExponentials = require('..'); /** Options for command entry points. * diff --git a/test/bin/json-replace-exponentials.js b/test/bin/json-replace-exponentials.js index d3c4e10..d56e069 100644 --- a/test/bin/json-replace-exponentials.js +++ b/test/bin/json-replace-exponentials.js @@ -5,8 +5,8 @@ 'use strict'; -const assert = require('assert'); -const { PassThrough } = require('stream'); +const assert = require('node:assert'); +const { PassThrough } = require('node:stream'); const jreBin = require('../../bin/json-replace-exponentials.js'); const packageJson = require('../../package.json'); diff --git a/test/index.js b/test/index.js index 6a6e31a..e86c70c 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ 'use strict'; -const assert = require('assert'); +const assert = require('node:assert'); // https://github.com/import-js/eslint-plugin-import/issues/2844 // eslint-disable-next-line import/extensions