aboutsummaryrefslogtreecommitdiffstats
path: root/config/fileUrlToDirname.js
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-09 22:16:29 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-09 22:17:26 +0100
commitfb7118ff1c8f0dcd61f15e51b193512283d83fa1 (patch)
tree721cee6a64b44a56b7f05f39750a65cda5fb4ef6 /config/fileUrlToDirname.js
parentbuild: Add eslint-plugin-jest (diff)
downloadsophie-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/fileUrlToDirname.js')
-rw-r--r--config/fileUrlToDirname.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/fileUrlToDirname.js b/config/fileUrlToDirname.js
new file mode 100644
index 0000000..9b51305
--- /dev/null
+++ b/config/fileUrlToDirname.js
@@ -0,0 +1,10 @@
1import path from 'node:path';
2import { fileURLToPath } from 'node:url';
3
4/**
5 * @param {string} url
6 * @returns {string}
7 */
8export default function fileUrlToDirname(url) {
9 return path.dirname(fileURLToPath(url));
10}