Skip to content
Snippets Groups Projects
Unverified Commit 9e680bd5 authored by Nayeem Rahman's avatar Nayeem Rahman Committed by Alexander Harkness
Browse files

Add format checking and linting as npm scripts

Also rename some CI jobs
parent 7da24d23
No related branches found
No related tags found
Loading
Pipeline #104019 passed
......@@ -22,7 +22,7 @@ submodule_fetch:
- src/signalbuddy
- src/yjs
node_install:
npm_install_prod:
stage: deps
dependencies:
- submodule_fetch
......@@ -36,7 +36,7 @@ node_install:
- src/signalbuddy
- src/yjs
dev_node_install:
npm_install:
stage: deps
dependencies:
- submodule_fetch
......@@ -50,42 +50,42 @@ dev_node_install:
- src/signalbuddy
- src/yjs
check_format:
format_check:
stage: check
dependencies:
- dev_node_install
- npm_install
script:
- npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}"
- npm run format-check
lint:
stage: check
dependencies:
- dev_node_install
- npm_install
script:
- npx eslint --ignore-path .gitignore "**/*.js"
- npm run lint
backend_build:
build:
stage: build
dependencies:
- dev_node_install
- npm_install
script:
- npm run build
artifacts:
paths:
- public/
backend_test:
test:
stage: test
dependencies:
- dev_node_install
- npm_install
script:
- npm test
deploy:
stage: deploy
dependencies:
- node_install
- backend_build
- npm_install_prod
- build
only:
- master
script:
......
......@@ -18,7 +18,9 @@
"test": "jest --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs",
"test-changed": "jest --only-changed --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs",
"test-coverage": "jest --coverage --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs",
"lint": "jshint .",
"format": "prettier --ignore-path .gitignore --check --write '**/*.{html,js,json,md}'",
"format-check": "prettier --ignore-path .gitignore --check '**/*.{html,js,json,md}'",
"lint": "eslint --ignore-path .gitignore '**/*.js'",
"validate": "npm ls"
},
"dependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment