metamigo-api: use in-tree dev configs

This commit is contained in:
Abel Luck 2023-03-13 10:29:40 +00:00
parent 8abcdcd5b8
commit ed3ef6fc21
5 changed files with 49 additions and 27 deletions

View file

@ -1 +1,26 @@
require("../.eslintrc.js");
require("eslint-config-link/patch/modern-module-resolution");
module.exports = {
extends: [
"eslint-config-link/profile/node",
"eslint-config-link/eslint-config-amigo/profile/typescript",
"eslint-config-link/eslint-config-amigo/profile/jest",
],
parserOptions: { tsconfigRootDir: __dirname },
rules: {
"new-cap": "off",
"import/no-extraneous-dependencies": [
// enable this when this is fixed
// https://github.com/benmosher/eslint-plugin-import/pull/1696
"off",
{
packageDir: [
".",
"node_modules/@digiresilience/amigo",
"node_modules/@digiresilience/amigo-dev",
],
},
],
// TODO: enable this after jest fixes this issue https://github.com/nodejs/node/issues/38343
"unicorn/prefer-node-protocol": "off"
},
};

View file

@ -1,6 +1,5 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript"
"babel-preset-link"
]
}
}

View file

@ -0,0 +1,4 @@
{
"preset": "jest-config-link",
"setupFiles": ["<rootDir>/src/setup.test.ts"]
}

View file

@ -37,13 +37,7 @@
"twilio": "^3.84.1"
},
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@types/jest": "^29.2.5",
"eslint": "^8.32.0",
"pino-pretty": "^9.1.1",
"prettier": "^2.8.3",
"ts-node": "^10.9.1",
"typescript": "4.9.4",
"@types/hapi__wreck": "^17.0.1",
@ -52,7 +46,11 @@
"@types/node": "*",
"camelcase-keys": "^8.0.2",
"pg-monitor": "^2.0.0",
"typedoc": "^0.23.24"
"typedoc": "^0.23.24",
"tsconfig-link": "*",
"eslint-config-link": "*",
"jest-config-link": "*",
"babel-preset-link": "*"
},
"nodemonConfig": {
"ignore": [
@ -62,16 +60,16 @@
},
"scripts": {
"build": "tsc -p tsconfig.json",
"test": "JEST_CIRCUS=1 jest --coverage --forceExit --detectOpenHandles --reporters=default --reporters=jest-junit",
"fmt": "prettier \"src/**/*.ts\" --write",
"lint": "eslint src --ext .ts",
"lint-fmt": "prettier \"src/**/*.ts\" --list-different",
"fix:lint": "eslint src --ext .ts --fix",
"fix:prettier": "prettier \"src/**/*.ts\" --write",
"cli": "NODE_ENV=development nodemon --unhandled-rejections=strict build/main/cli/index.js",
"serve": "NODE_ENV=development npm run cli server",
"serve:prod": "NODE_ENV=production npm run cli server",
"worker": "NODE_ENV=development npm run cli worker",
"worker:prod": "NODE_ENV=production npm run cli worker",
"lint:lint": "eslint src --ext .ts",
"lint:prettier": "prettier \"src/**/*.ts\" --list-different",
"lint": "npm run lint:lint && npm run lint:prettier",
"watch:build": "tsc -p tsconfig.json -w"
}
}