From 3437b9c0e6e60cf0782fdb534ac348e07decdbe6 Mon Sep 17 00:00:00 2001 From: 3rd <3rd@users.noreply.github.com> Date: Thu, 18 Jan 2024 23:37:47 +0200 Subject: [PATCH] chore: fix ERR_UNKNOWN_FILE_EXTENSION for ava & commitlint --- .husky/commit-msg | 2 +- package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index cee8f66..c92c533 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -NODE_OPTIONS='--loader=tsx --no-warnings' npx --no-install commitlint --edit "$1" +NODE_OPTIONS='--import=tsx --no-warnings' npx --no-install commitlint --edit "$1" diff --git a/package.json b/package.json index 8a0046f..ff016d7 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "dev": "pnpm test:watch", "build:watch": "pkgroll --watch", "build": "pnpm run clean && pkgroll --target=node18", - "test": "NODE_OPTIONS='--import tsx --no-warnings' ava", - "test:watch": "NODE_OPTIONS='--import tsx --no-warnings' ava --watch", + "test": "NODE_OPTIONS='--import=tsx --no-warnings' ava", + "test:watch": "NODE_OPTIONS='--import=tsx --no-warnings' ava --watch", "e2e": "docker run --rm -it $(docker build -f src/e2e/Dockerfile -q .)", "tsc": "tsc", "prepare": "husky install", @@ -50,7 +50,7 @@ }, "ava": { "extensions": { - "ts": "module" + "ts": "commonjs" } }, "lint-staged": {