Skip to content

Commit 1b26fb5

Browse files
Update Project Config (#18)
1 parent 296e412 commit 1b26fb5

File tree

9 files changed

+99
-250
lines changed

9 files changed

+99
-250
lines changed

.eslintignore

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
# Compiled Output
2+
/dist
3+
/node_modules
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# OS
14+
.DS_Store
15+
16+
# Tests
17+
/coverage
18+
/.nyc_output
19+
20+
# IDEs and editors
21+
/.idea
22+
.project
23+
.classpath
24+
.c9/
25+
*.launch
26+
.settings/
27+
*.sublime-workspace
28+
29+
# IDE - VSCode
30+
.vscode/*
31+
!.vscode/settings.json
32+
!.vscode/tasks.json
33+
!.vscode/launch.json
34+
!.vscode/extensions.json
35+
36+
# Enviroment
37+
*.env*
38+
!.env.docker
39+
40+
# Core
141
src/core
2-
jest.config.js
3-
scripts/
42+
43+
# Local Database
44+
/mongo-volume
45+
46+
# Auto Generated Files
47+
src/schemas.gql
48+
49+
# Docker
50+
docker/
51+
52+
# tsconfig
53+
tsconfig*
54+
!tsconfig.json
55+
!tsconfig.build.json

.lintstagedrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 55 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
// ================== Editor General Config =====================
3+
24
// Define Tab Size = 2 Spaces (Half of the Default Size)
35
"editor.tabSize": 2,
46

@@ -23,13 +25,28 @@
2325

2426
// Make VSCode understand this files as files of this languages
2527
"files.associations": {
26-
".prettierignore": "ignore",
27-
".lintstagedrc": "json",
28-
".env.*": "env"
29-
},
30-
"material-icon-theme.languages.associations": {
31-
"env": "tune"
32-
},
28+
".prettierignore": "ignore",
29+
".lintstagedrc": "json",
30+
".env.*": "env"
31+
},
32+
"material-icon-theme.languages.associations": {
33+
"env": "tune"
34+
},
35+
36+
// ======================= Formatters ===========================
37+
38+
"[javascript]": {
39+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
40+
},
41+
"[typescript]": {
42+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
43+
},
44+
"[javascriptreact]": {
45+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
46+
},
47+
"[typescriptreact]": {
48+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
49+
},
3350

3451
// ================ Languages General Config ====================
3552

jest.config.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ module.exports = {
1616
testEnvironment: "node",
1717
moduleDirectories: ["node_modules", "src"],
1818
resetMocks: true,
19-
// coverageThreshold: {
20-
// global: {
21-
// branches: 100,
22-
// functions: 100,
23-
// lines: 100,
24-
// statements: 100,
25-
// },
26-
// },
19+
/*
20+
* CoverageThreshold: {
21+
* global: {
22+
* branches: 100,
23+
* functions: 100,
24+
* lines: 100,
25+
* statements: 100,
26+
* },
27+
* },
28+
*/
2729
};

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"eslint-plugin-sonarjs": "^0.7.0",
4848
"husky": "^6.0.0",
4949
"jest": "^26.6.3",
50-
"lint-staged": "^10.5.4",
5150
"prettier": "^2.3.0",
5251
"supertest": "^6.0.0",
5352
"ts-jest": "^26.5.5",
@@ -66,7 +65,7 @@
6665
"dev:docker": "nest start --watch --exec 'node -r tsconfig-paths/register'",
6766
"start:debug": "nest start --debug --watch",
6867
"start:prod": "node dist/main",
69-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
68+
"lint": "eslint . --fix --quiet",
7069
"test": "jest",
7170
"test:watch": "jest --watch",
7271
"test:cov": "jest --coverage",
@@ -77,7 +76,7 @@
7776
"docker": "docker-compose up",
7877
"docker:clear": "docker container rm base-service_api && docker image rm base-service_api && docker volume rm base-service_nodemodules",
7978
"migration:generate": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config ormconfig.migrations.json migration:generate -d src/v1/migrations -n",
80-
"husky:pre-commit": "tsc && lint-staged",
79+
"husky:pre-commit": "tsc && eslint . --quiet",
8180
"temp:test-tsc": "tsc",
8281
"husky:config": "husky install"
8382
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"incremental": true,
2121
"baseUrl": "src"
2222
},
23-
"include": ["src/**/*.ts"]
23+
"include": ["src/**/*.ts", "jest.config.js"]
2424
}

0 commit comments

Comments
 (0)