aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-16 14:32:15 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-16 14:32:15 +0200
commitdf98563e2104b82b119c00a3cd83cd0dc1242d25 (patch)
treea9720bf01bac9ad5646bd3d3c9bc7653617afdad /scripts
parent46757b477c1adb5f98060d15998a3852e18902a6 (diff)
downloadPeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.tar.gz
PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.tar.zst
PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.zip
Use typescript standard and lint all files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check.ts4
-rwxr-xr-xscripts/test.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/check.ts b/scripts/check.ts
index 28167482c..24f4806af 100755
--- a/scripts/check.ts
+++ b/scripts/check.ts
@@ -130,7 +130,7 @@ function isThereValidCORSHeaders (res: request.RequestResponse) {
130 console.error(headerAllowMethodsKey + ' is not present.') 130 console.error(headerAllowMethodsKey + ' is not present.')
131 fail = true 131 fail = true
132 } else { 132 } else {
133 const allowMethodsMissed = findPatternNotInString(headerAllowMethods, [ 'get' ]) 133 const allowMethodsMissed = findPatternNotInString(headerAllowMethods as string, [ 'get' ])
134 if (allowMethodsMissed !== null) { 134 if (allowMethodsMissed !== null) {
135 console.error(headerAllowMethodsKey + ' misses the ' + allowMethodsMissed + ' method.') 135 console.error(headerAllowMethodsKey + ' misses the ' + allowMethodsMissed + ' method.')
136 fail = true 136 fail = true
@@ -147,7 +147,7 @@ function isThereValidCORSHeaders (res: request.RequestResponse) {
147 const headersThatShouldBePresent = [ 147 const headersThatShouldBePresent = [
148 'Range' 148 'Range'
149 ] 149 ]
150 const allowHeadersMissed = findPatternNotInString(headerAllowHeaders, headersThatShouldBePresent) 150 const allowHeadersMissed = findPatternNotInString(headerAllowHeaders as string, headersThatShouldBePresent)
151 if (allowHeadersMissed !== null) { 151 if (allowHeadersMissed !== null) {
152 console.error(headerAllowHeadersKey + ' misses the ' + allowHeadersMissed + ' header.') 152 console.error(headerAllowHeadersKey + ' misses the ' + allowHeadersMissed + ' header.')
153 fail = true 153 fail = true
diff --git a/scripts/test.sh b/scripts/test.sh
index b341fc0d0..701dea8d0 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -4,5 +4,5 @@ cd client || exit -1
4npm test || exit -1 4npm test || exit -1
5 5
6cd .. || exit -1 6cd .. || exit -1
7standard || exit -1 7npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts server/**/*.ts || exit -1
8mocha server/tests 8mocha server/tests