lint pretty
This commit is contained in:
parent
f81ed33b26
commit
51e8cdb413
|
@ -12,7 +12,7 @@ test:
|
||||||
stage: test
|
stage: test
|
||||||
image: docker/compose:latest
|
image: docker/compose:latest
|
||||||
variables:
|
variables:
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ''
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
|
@ -33,7 +33,7 @@ build:
|
||||||
stage: build
|
stage: build
|
||||||
image: docker:20.10.22
|
image: docker:20.10.22
|
||||||
variables:
|
variables:
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ''
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
before_script:
|
before_script:
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
node_modules
|
||||||
|
*.log*
|
||||||
|
.env
|
||||||
|
dist
|
||||||
|
coverage
|
||||||
|
.prettierrc.json
|
10
README.md
10
README.md
|
@ -56,6 +56,7 @@ The app exposes the following [gRPC](https://grpc.io/) services :
|
||||||
"lat": 46.143376
|
"lat": 46.143376
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- **FindForPoints** : find all territories that include a list of given points (represented by their longitude and latitude)
|
- **FindForPoints** : find all territories that include a list of given points (represented by their longitude and latitude)
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
@ -70,7 +71,6 @@ The app exposes the following [gRPC](https://grpc.io/) services :
|
||||||
"lat": 47.143376
|
"lat": 47.143376
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ As mentionned earlier, RabbitMQ messages are sent after these events :
|
||||||
|
|
||||||
Various messages are also sent for logging purpose.
|
Various messages are also sent for logging purpose.
|
||||||
|
|
||||||
## Tests
|
## Tests / ESLint / Prettier
|
||||||
|
|
||||||
Tests are run outside the container for ease of use (switching between different environments inside containers using prisma is complicated and error prone).
|
Tests are run outside the container for ease of use (switching between different environments inside containers using prisma is complicated and error prone).
|
||||||
The integration tests use a dedicated database (see _db-test_ section of _docker-compose.yml_).
|
The integration tests use a dedicated database (see _db-test_ section of _docker-compose.yml_).
|
||||||
|
@ -151,6 +151,12 @@ npm run test:integration
|
||||||
|
|
||||||
# coverage
|
# coverage
|
||||||
npm run test:cov
|
npm run test:cov
|
||||||
|
|
||||||
|
# ESLint
|
||||||
|
npm run lint
|
||||||
|
|
||||||
|
# Prettier
|
||||||
|
npm run pretty
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
@ -25,5 +25,9 @@ RUN npm run build
|
||||||
# Run unit tests
|
# Run unit tests
|
||||||
RUN npm run test:unit:ci
|
RUN npm run test:unit:ci
|
||||||
|
|
||||||
|
# ESLint / Prettier
|
||||||
|
RUN npm run lint:check
|
||||||
|
RUN npm run pretty:check
|
||||||
|
|
||||||
# Start the server
|
# Start the server
|
||||||
CMD [ "node", "dist/main.js" ]
|
CMD [ "node", "dist/main.js" ]
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
"start:debug": "nest start --debug --watch",
|
"start:debug": "nest start --debug --watch",
|
||||||
"start:prod": "node dist/main",
|
"start:prod": "node dist/main",
|
||||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||||
|
"lint:check": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix-dry-run --ignore-path .gitignore",
|
||||||
|
"pretty:check": "./node_modules/.bin/prettier --check .",
|
||||||
|
"pretty": "./node_modules/.bin/prettier --write .",
|
||||||
"test": "npm run migrate:test && dotenv -e .env.test jest",
|
"test": "npm run migrate:test && dotenv -e .env.test jest",
|
||||||
"test:unit": "jest --testPathPattern 'tests/unit/' --verbose",
|
"test:unit": "jest --testPathPattern 'tests/unit/' --verbose",
|
||||||
"test:unit:ci": "jest --testPathPattern 'tests/unit/' --coverage",
|
"test:unit:ci": "jest --testPathPattern 'tests/unit/' --coverage",
|
||||||
|
|
Loading…
Reference in New Issue