Skip to content

Commit

Permalink
chore: add stryker config package
Browse files Browse the repository at this point in the history
  • Loading branch information
notaphplover committed Oct 18, 2024
1 parent 21f07df commit 1dab4fb
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/foundation/tools/stryker-config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# node modules
/node_modules/

# Turborepo files
.turbo/
5 changes: 5 additions & 0 deletions packages/foundation/tools/stryker-config/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.js": [
"prettier --write"
]
}
33 changes: 33 additions & 0 deletions packages/foundation/tools/stryker-config/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// @ts-check
/**
* @type {import('@stryker-mutator/api/core').PartialStrykerOptions}
*/
export default {
checkers: ['typescript'],
cleanTempDir: 'always',
concurrency: 1,
coverageAnalysis: 'perTest',
disableTypeChecks: 'src/**/*.ts',
jest: {
configFile: './jest.config.stryker.mjs',
enableFindRelatedTests: true,
projectType: 'custom',
},
mutate: [
'src/**/*.ts',
'!src/**/*.spec.ts',
'!src/**/*{Fixtures,Mocks}.ts',
'!src/**/adapter/nest/modules/*.ts',
'!src/**/adapter/typeorm/migrations/*.ts',
'!src/**/adapter/typeorm/scripts/*.ts',
'!src/**/application/controllers/*.ts',
],
packageManager: 'pnpm',
plugins: [
'@stryker-mutator/jest-runner',
'@stryker-mutator/typescript-checker',
],
tempDirName: 'stryker-tmp',
testRunner: 'jest',
tsconfigFile: './tsconfig.json',
};
23 changes: 23 additions & 0 deletions packages/foundation/tools/stryker-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"author": "Roberto Pintos López",
"bugs": {
"url": "https://github.com/inversify/monorepo/issues"
},
"description": "Stryker config for monorepo packages",
"devDependencies": {
"@stryker-mutator/api": "8.6.0"
},
"exports": "./lib/index.js",
"homepage": "https://github.com/inversify/monorepo#readme",
"license": "MIT",
"name": "@cornie-js/backend-stryker-config",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/inversify/monorepo.git"
},
"scripts": {
"format": "prettier --write ./lib/**/*.js"
},
"type": "module"
}
3 changes: 3 additions & 0 deletions packages/foundation/tools/stryker-config/prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@inversifyjs/foundation-prettier-config';

export default config;

0 comments on commit 1dab4fb

Please sign in to comment.