From 53559e8c9fb7f6b5a35cd9f4a2f46f4103b0f8f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 1 May 2023 15:05:46 +0200 Subject: [PATCH] build: sort imports with eslint MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .eslintrc.js | 8 ++++---- deep-clone-object.js | 2 +- random.js | 2 +- shallow-clone-object.js | 2 +- uuid-generator.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4ca2c63..0f45749 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,11 +4,11 @@ const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ root: true, env: { - es2021: true, + es2022: true, node: true }, parserOptions: { - ecmaVersion: 2021, + ecmaVersion: 2022, sourceType: 'module' }, plugins: ['promise', 'jsdoc'], @@ -24,9 +24,9 @@ module.exports = defineConfig({ 'sort-imports': [ 'warn', { - ignoreMemberSort: true, ignoreDeclarationSort: true } - ] + ], + 'import/order': 'warn' } }) diff --git a/deep-clone-object.js b/deep-clone-object.js index ed308e9..056e1de 100644 --- a/deep-clone-object.js +++ b/deep-clone-object.js @@ -1,8 +1,8 @@ /* eslint-disable no-unused-vars */ const Benchmark = require('benny') -const { generateRandomObject } = require('./benchmark-utils') const _ = require('lodash') const clone = require('just-clone') +const { generateRandomObject } = require('./benchmark-utils') const object = generateRandomObject() diff --git a/random.js b/random.js index 1518347..c3e5c4a 100644 --- a/random.js +++ b/random.js @@ -1,9 +1,9 @@ +const crypto = require('crypto') const Benchmark = require('benny') const { secureRandom, secureRandomWithRandomValues } = require('./benchmark-utils') -const crypto = require('crypto') const maximum = 281474976710654 diff --git a/shallow-clone-object.js b/shallow-clone-object.js index 7ccc541..9201f83 100644 --- a/shallow-clone-object.js +++ b/shallow-clone-object.js @@ -1,7 +1,7 @@ /* eslint-disable no-unused-vars */ const Benchmark = require('benny') -const { generateRandomObject } = require('./benchmark-utils') const _ = require('lodash') +const { generateRandomObject } = require('./benchmark-utils') const object = generateRandomObject() diff --git a/uuid-generator.js b/uuid-generator.js index 0bed70c..6855cec 100644 --- a/uuid-generator.js +++ b/uuid-generator.js @@ -1,5 +1,5 @@ -const Benchmark = require('benny') const crypto = require('crypto') +const Benchmark = require('benny') const { v4: uuid } = require('uuid') Benchmark.suite( -- 2.34.1