Skip to content

Commit

Permalink
Pacify tsLint (use const instead of var)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Straut committed Nov 20, 2017
1 parent f7ce180 commit 16e5bfa
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jenkins-api-ts-typings",
"version": "0.8.1",
"version": "0.8.2",
"description": "Jenkins JSON API TypeScript Typings",
"keywords": [
"jenkins",
Expand Down
4 changes: 2 additions & 2 deletions src/JenkinsAction.ts
Expand Up @@ -47,7 +47,7 @@ export class JenkinsAction implements IJenkinsAction {
}

public fromJsonString(json: string) {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand All @@ -60,7 +60,7 @@ export class JenkinsAction implements IJenkinsAction {
this._class = (data as any)["_class"];
}

var objectData:Map<string, any> = new Map<string, any>();
const objectData:Map<string, any> = new Map<string, any>();
Object.keys(data).filter(key => key !== "_class").forEach(function(key) {
objectData.set(key, (data as any)[key]);
});
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsBuild.ts
Expand Up @@ -47,7 +47,7 @@ import { IJenkinsAction } from './jenkins-api-ts-typings'
}

public fromJsonString(json: string): void {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down
6 changes: 3 additions & 3 deletions src/JenkinsChangeSet.ts
Expand Up @@ -30,7 +30,7 @@ export class JenkinsChangeSet implements IJenkinsChangeSet {
}

public fromJsonString(json: string) {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand All @@ -44,9 +44,9 @@ export class JenkinsChangeSet implements IJenkinsChangeSet {
}

if(data.hasOwnProperty("affectedPaths")) {
var paths:Array<string> = ((data as any)["affectedPaths"]) as Array<string>;
const paths:Array<string> = ((data as any)["affectedPaths"]) as Array<string>;

for(var affectedPath of paths) {
for(const affectedPath of paths) {
this.affectedPaths.push(affectedPath);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsHealthReport.ts
Expand Up @@ -15,7 +15,7 @@ export class JenkinsHealthReport implements IJenkinsHealthReport {
}

public fromJsonString(json: string): void {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsJob.ts
Expand Up @@ -57,7 +57,7 @@ export class JenkinsJob implements IJenkinsJob {
}

public fromJsonString(json: string): void {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsNode.ts
Expand Up @@ -39,7 +39,7 @@ export class JenkinsNode implements IJenkinsNode{
}

public fromJsonString(json: string) {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsTimeInQueueAction.ts
Expand Up @@ -23,7 +23,7 @@ export class JenkinsTimeInQueueAction extends JenkinsAction {
}

public fromJsonString(json: string) {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsUser.ts
Expand Up @@ -22,7 +22,7 @@ export class JenkinsUser implements IJenkinsUser {
}

fromJsonString(json: string): void {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsView.ts
Expand Up @@ -25,7 +25,7 @@ export class JenkinsView implements IJenkinsView {
}

public fromJsonString(json: string) {
var data:JSON = JSON.parse(json);
const data:JSON = JSON.parse(json);
this.jsonData = data;

this.fromJson(data);
Expand Down

0 comments on commit 16e5bfa

Please sign in to comment.