diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-01-09 22:16:29 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-01-09 22:17:26 +0100 |
commit | fb7118ff1c8f0dcd61f15e51b193512283d83fa1 (patch) | |
tree | 721cee6a64b44a56b7f05f39750a65cda5fb4ef6 /config/jest.config.base.js | |
parent | build: Add eslint-plugin-jest (diff) | |
download | sophie-fb7118ff1c8f0dcd61f15e51b193512283d83fa1.tar.gz sophie-fb7118ff1c8f0dcd61f15e51b193512283d83fa1.tar.zst sophie-fb7118ff1c8f0dcd61f15e51b193512283d83fa1.zip |
build: Add eslint-plugin-unicorn
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'config/jest.config.base.js')
-rw-r--r-- | config/jest.config.base.js | 14 |
1 files changed, 7 insertions, 7 deletions
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 @@ | |||
1 | import { join } from 'path'; | 1 | import path from 'node:path'; |
2 | 2 | ||
3 | import fileURLToDirname from './fileURLToDirname.js'; | 3 | import fileUrlToDirname from './fileUrlToDirname.js'; |
4 | 4 | ||
5 | const thisDir = fileURLToDirname(import.meta.url); | 5 | const thisDir = fileUrlToDirname(import.meta.url); |
6 | 6 | ||
7 | /** @type {import('@jest/types').Config.InitialOptions} */ | 7 | /** @type {import('@jest/types').Config.InitialOptions} */ |
8 | export default { | 8 | export default { |
9 | transform: { | 9 | transform: { |
10 | '\\.tsx?$': join(thisDir, 'jestEsbuildTransformer.js'), | 10 | '\\.tsx?$': path.join(thisDir, 'jestEsbuildTransformer.js'), |
11 | }, | 11 | }, |
12 | extensionsToTreatAsEsm: ['.ts', '.tsx'], | 12 | extensionsToTreatAsEsm: ['.ts', '.tsx'], |
13 | moduleNameMapper: { | 13 | moduleNameMapper: { |
14 | '^@sophie/(.+)$': join(thisDir, '../packages/$1/src/index.ts'), | 14 | '^@sophie/(.+)$': path.join(thisDir, '../packages/$1/src/index.ts'), |
15 | '^(\\.{1,2}/.*)\\.jsx?$': '$1', | 15 | '^(\\.{1,2}/.*)\\.jsx?$': '$1', |
16 | // Workaround for jest to recognize the vendored dependencies of chalk. | 16 | // Workaround for jest to recognize the vendored dependencies of chalk. |
17 | '^#ansi-styles$': join( | 17 | '^#ansi-styles$': path.join( |
18 | thisDir, | 18 | thisDir, |
19 | '../node_modules/chalk/source/vendor/ansi-styles/index.js', | 19 | '../node_modules/chalk/source/vendor/ansi-styles/index.js', |
20 | ), | 20 | ), |
21 | '^#supports-color$': join( | 21 | '^#supports-color$': path.join( |
22 | thisDir, | 22 | thisDir, |
23 | '../node_modules/chalk/source/vendor/supports-color/index.js', | 23 | '../node_modules/chalk/source/vendor/supports-color/index.js', |
24 | ), | 24 | ), |