From fb7118ff1c8f0dcd61f15e51b193512283d83fa1 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sun, 9 Jan 2022 22:16:29 +0100 Subject: build: Add eslint-plugin-unicorn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristóf Marussy --- config/jest.config.base.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'config/jest.config.base.js') diff --git a/config/jest.config.base.js b/config/jest.config.base.js index 21f93be..d9865f9 100644 --- a/config/jest.config.base.js +++ b/config/jest.config.base.js @@ -1,24 +1,24 @@ -import { join } from 'path'; +import path from 'node:path'; -import fileURLToDirname from './fileURLToDirname.js'; +import fileUrlToDirname from './fileUrlToDirname.js'; -const thisDir = fileURLToDirname(import.meta.url); +const thisDir = fileUrlToDirname(import.meta.url); /** @type {import('@jest/types').Config.InitialOptions} */ export default { transform: { - '\\.tsx?$': join(thisDir, 'jestEsbuildTransformer.js'), + '\\.tsx?$': path.join(thisDir, 'jestEsbuildTransformer.js'), }, extensionsToTreatAsEsm: ['.ts', '.tsx'], moduleNameMapper: { - '^@sophie/(.+)$': join(thisDir, '../packages/$1/src/index.ts'), + '^@sophie/(.+)$': path.join(thisDir, '../packages/$1/src/index.ts'), '^(\\.{1,2}/.*)\\.jsx?$': '$1', // Workaround for jest to recognize the vendored dependencies of chalk. - '^#ansi-styles$': join( + '^#ansi-styles$': path.join( thisDir, '../node_modules/chalk/source/vendor/ansi-styles/index.js', ), - '^#supports-color$': join( + '^#supports-color$': path.join( thisDir, '../node_modules/chalk/source/vendor/supports-color/index.js', ), -- cgit v1.2.3-54-g00ecf