mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
enforce strict typescript
This commit is contained in:
parent
eaab01009c
commit
70711fa028
4
.eslintignore
Normal file
4
.eslintignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
node_modules/
|
||||||
|
build/
|
||||||
|
coverage/
|
||||||
|
.vuepress/
|
||||||
@ -118,6 +118,28 @@
|
|||||||
"promise/no-multiple-resolved": "error"
|
"promise/no-multiple-resolved": "error"
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["*.ts", "*.tsx"],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"tsconfigRootDir": ".",
|
||||||
|
"project": ["./tsconfig.json", "**/tsconfig.json"],
|
||||||
|
"ecmaVersion": "latest",
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"plugins": ["@typescript-eslint"],
|
||||||
|
"extends": [
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||||
|
"plugin:@typescript-eslint/strict"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
// allow explicitly defined dangling promises
|
||||||
|
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true }],
|
||||||
|
"no-void": ["error", { "allowAsStatement": true }]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"files": ["!*.json"],
|
"files": ["!*.json"],
|
||||||
"plugins": ["prettier"],
|
"plugins": ["prettier"],
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
"db:reset": "TZ=UTC npx prisma migrate reset --force",
|
"db:reset": "TZ=UTC npx prisma migrate reset --force",
|
||||||
"db:seed": "TZ=UTC npx prisma db seed",
|
"db:seed": "TZ=UTC npx prisma db seed",
|
||||||
"test:lint": "npm run test:lint:eslint && npm run test:lint:remark",
|
"test:lint": "npm run test:lint:eslint && npm run test:lint:remark",
|
||||||
"test:lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.yml,.yaml --max-warnings 0 --ignore-path .gitignore .",
|
"test:lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.yml,.yaml --max-warnings 0 .",
|
||||||
"test:lint:remark": "remark . --quiet --frail",
|
"test:lint:remark": "remark . --quiet --frail",
|
||||||
"test:unit": "TZ=UTC jest --runInBand --forceExit --detectOpenHandles",
|
"test:unit": "TZ=UTC jest --runInBand --forceExit --detectOpenHandles",
|
||||||
"test": "npm run test:lint && npm run test:unit",
|
"test": "npm run test:lint && npm run test:unit",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user