Commit f5a3df2c authored by Maxime Emschwiller's avatar Maxime Emschwiller

feat(ci): run prettier in ci

parent 6fd21383
Pipeline #62968 failed with stages
in 2 minutes and 20 seconds
......@@ -58,7 +58,7 @@ lint_backend:
tags:
- docker
lint_frontend:
lint_frontend_and_documentation:
<<: *only-default
stage: check_and_lint
image: registry.gitlab.utc.fr/rex-dri/rex-dri/frontend:v2.1.0
......@@ -66,10 +66,10 @@ lint_frontend:
- cd frontend && mkdir -p node_modules && mv -f /usr/src/deps/node_modules/* /usr/src/deps/node_modules/.bin ./node_modules/
script:
- yarn lint
- yarn lint-doc
tags:
- docker
test_back:
<<: *only-default
stage: test
......
......@@ -27,6 +27,12 @@ docker-pull:
reformat_backend:
docker-compose exec backend sh -c "cd backend && black ."
reformat_frontend:
docker-compose exec frontend sh -c "cd frontend && yarn reformat"
reformat_documentation:
docker-compose exec frontend sh -c "cd frontend && yarn reformat-doc"
test_backend:
docker-compose exec backend sh -c "cd backend && pytest --cov --cov-config .coveragerc --cov-report term base_app/ backend_app/ stats_app/"
......@@ -42,6 +48,9 @@ lint_backend:
lint_frontend:
docker-compose exec frontend sh -c "cd frontend && yarn lint"
lint_documentation:
docker-compose exec frontend sh -c "cd frontend && yarn lint-doc"
build_frontend:
docker-compose exec frontend sh -c "cd frontend && yarn build"
......
/webpack-stats.json
......@@ -4,8 +4,11 @@
"description": "[![build](/../badges/master/build.svg)](https://gitlab.utc.fr/chehabfl/outgoing_rex/pipelines) [![coverage](/../badges/master/coverage.svg)](https://chehabfl.gitlab.utc.fr/outgoing_rex/) [![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)",
"main": "manage.py",
"scripts": {
"lint": "eslint src --ext js --ext jsx",
"lint": "prettier --check . && eslint src --ext js --ext jsx",
"reformat": "prettier --write .",
"lint-fix": "eslint src --ext js --ext jsx --fix",
"lint-doc": "prettier --check ../documentation",
"reformat-doc": "prettier --write ../documentation",
"dev": "node server.js",
"build": "webpack --config webpack.config.build.js",
"test": "jest",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment