Skip to content

Commit

Permalink
Turns on strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jun 2, 2018
1 parent f4a4391 commit 009c3d6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

## Master

* Turns on the strict mode in the typescript compiler, this only gave build errors, so I was basically there anyway.
This is so that the type defs will always pass inside environments where strict is already enabled. - [@orta][]

# 3.7.14

* Minor refactoring in GitHubUtils to allow Peril to re-create some of the util functions - [@orta][]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "danger",
"version": "3.7.13",
"version": "3.7.14",
"description": "Unit tests for Team Culture",
"main": "distribution/danger.js",
"typings": "distribution/danger.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions source/platforms/BitBucketServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export class BitBucketServer implements Platform {
* Fails the current build, if status setting succeeds
* then return true.
*/

updateStatus = async (passed: boolean, message: string, url?: string): Promise<boolean> => {
updateStatus = async (passed: boolean | "pending", message: string, url?: string): Promise<boolean> => {
const pr = await this.api.getPullRequestInfo()
const { latestCommit } = pr.fromRef
try {
Expand Down
2 changes: 1 addition & 1 deletion source/platforms/FakePlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class FakePlatform implements Platform {
return true
}

async updateStatus(_success: boolean, _message: string): Promise<boolean> {
async updateStatus(): Promise<boolean> {
return true
}

Expand Down
2 changes: 1 addition & 1 deletion source/platforms/LocalGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class LocalGit implements Platform {
return true
}

async updateStatus(_success: boolean, _message: string): Promise<boolean> {
async updateStatus(): Promise<boolean> {
return true
}

Expand Down
3 changes: 2 additions & 1 deletion source/platforms/bitbucket_server/BitBucketServerAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ export class BitBucketServerAPI {
})
}

getFileContents = async (filePath: string, repoSlug: string, refspec: string) => {
// The last two are "optional" in the protocol, but not really optional WRT the BBSAPI
getFileContents = async (filePath: string, repoSlug?: string, refspec?: string) => {
const path = `${repoSlug}/` + `raw/${filePath}` + `?at=${refspec}`
const res = await this.get(path, undefined, true)
if (res.status === 404) {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"pretty": true,
"target": "es5",
"outDir": "distribution",
"lib": ["dom", "es2017"]
"lib": ["dom", "es2017"],
"strict": true
},
"formatCodeOptions": {
"indentSize": 2,
Expand Down

0 comments on commit 009c3d6

Please sign in to comment.