From d1a2216777795309d4728c7766f4f447506e945b Mon Sep 17 00:00:00 2001 From: Dominik Zogg Date: Wed, 20 Mar 2024 21:01:16 +0100 Subject: [PATCH] fix prettier/jest and update dependencies --- jest.config.cjs | 15 +++++++++++++++ package.json | 35 ++++++++++++----------------------- 2 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 jest.config.cjs diff --git a/jest.config.cjs b/jest.config.cjs new file mode 100644 index 0000000..581a3a6 --- /dev/null +++ b/jest.config.cjs @@ -0,0 +1,15 @@ +/* eslint-disable no-undef */ +/* eslint-disable functional/immutable-data */ +module.exports = { + 'preset': 'ts-jest', + 'testEnvironment': 'node', + 'collectCoverageFrom': [ + 'src/**/*.ts' + ], + 'coverageThreshold': { + 'global': { + 'lines': 100 + } + }, + prettierPath: require.resolve('prettier-2'), +}; diff --git a/package.json b/package.json index f17ec5f..edf511d 100644 --- a/package.json +++ b/package.json @@ -13,26 +13,14 @@ "repository": "chubbyts/chubbyts-http-static-file", "scripts": { "build": "node ./build.js", - "cs-fix": "prettier --write src tests", - "cs": "prettier --check src tests", + "cs-fix": "./node_modules/prettier/bin/prettier.cjs --write src tests", + "cs": "./node_modules/prettier/bin/prettier.cjs --check src tests", "infection": "stryker run", "lint-fix": "eslint src tests --fix", "lint": "eslint src tests", "prepare": "npm run build", "test": "jest" }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "collectCoverageFrom": [ - "src/**/*.ts" - ], - "coverageThreshold": { - "global": { - "lines": 100 - } - } - }, "prettier": { "printWidth": 120, "tabWidth": 2, @@ -60,15 +48,16 @@ "devDependencies": { "@chubbyts/chubbyts-eslint": "^2.0.3", "@chubbyts/chubbyts-function-mock": "^1.4.1", - "@chubbyts/chubbyts-packaging": "^2.0.4", - "@stryker-mutator/core": "^7.1.1", - "@stryker-mutator/jest-runner": "^7.1.1", - "@types/jest": "^29.5.3", - "@types/node": "^20.4.5", - "jest": "^29.6.1", - "prettier": "^3.0.0", - "ts-jest": "^29.1.1", - "typescript": "^5.1.6" + "@chubbyts/chubbyts-packaging": "^2.0.6", + "@stryker-mutator/core": "^8.2.6", + "@stryker-mutator/jest-runner": "^8.2.6", + "@types/jest": "^29.5.12", + "@types/node": "^20.11.30", + "jest": "^29.7.0", + "prettier": "^3.2.5", + "prettier-2": "npm:prettier@^2.8.8", + "ts-jest": "^29.1.2", + "typescript": "^5.4.3" }, "publishConfig": { "access": "public"