From: Jérôme Benoit Date: Mon, 1 May 2023 13:05:46 +0000 (+0200) Subject: build: sort imports with eslint X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=53559e8c9fb7f6b5a35cd9f4a2f46f4103b0f8f4;p=benchmarks-js.git build: sort imports with eslint Signed-off-by: Jérôme Benoit --- 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(