diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 14:32:15 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 14:32:15 +0200 |
commit | df98563e2104b82b119c00a3cd83cd0dc1242d25 (patch) | |
tree | a9720bf01bac9ad5646bd3d3c9bc7653617afdad /scripts | |
parent | 46757b477c1adb5f98060d15998a3852e18902a6 (diff) | |
download | PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.tar.gz PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.tar.zst PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.zip |
Use typescript standard and lint all files
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check.ts | 4 | ||||
-rwxr-xr-x | scripts/test.sh | 2 |
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 | |||
4 | npm test || exit -1 | 4 | npm test || exit -1 |
5 | 5 | ||
6 | cd .. || exit -1 | 6 | cd .. || exit -1 |
7 | standard || exit -1 | 7 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts server/**/*.ts || exit -1 |
8 | mocha server/tests | 8 | mocha server/tests |