Skip to content

Commit

Permalink
lint boavizta model
Browse files Browse the repository at this point in the history
Signed-off-by: jmc <[email protected]>
  • Loading branch information
jmcook1186 committed Sep 15, 2023
1 parent 77d6763 commit fb89310
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/lib/boavizta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ abstract class BoaviztaImpactModel implements IImpactModelInterface {

export class BoaviztaCpuImpactModel
extends BoaviztaImpactModel
implements IImpactModelInterface {
implements IImpactModelInterface
{
sharedParams: object | undefined = undefined;
public name: string | undefined;
public verbose = false;
Expand Down Expand Up @@ -203,7 +204,8 @@ export class BoaviztaCpuImpactModel

export class BoaviztaCloudImpactModel
extends BoaviztaImpactModel
implements IImpactModelInterface {
implements IImpactModelInterface
{
public sharedParams: object | undefined = undefined;
public instanceTypes: BoaviztaInstanceTypes = {};
public name: string | undefined;
Expand All @@ -221,9 +223,9 @@ export class BoaviztaCloudImpactModel
if (!countries.includes(location)) {
throw new Error(
"Improper configure: Invalid location parameter: '" +
location +
"'. Valid values are : " +
countries.join(', ')
location +
"'. Valid values are : " +
countries.join(', ')
);
}
}
Expand Down Expand Up @@ -257,9 +259,9 @@ export class BoaviztaCloudImpactModel
) {
throw new Error(
"Improper configure: Invalid instance_type parameter: '" +
staticParamsCast.instance_type +
"'. Valid values are : " +
this.instanceTypes[provider].join(', ')
staticParamsCast.instance_type +
"'. Valid values are : " +
this.instanceTypes[provider].join(', ')
);
}
} else {
Expand All @@ -276,9 +278,9 @@ export class BoaviztaCloudImpactModel
if (!supportedProviders.includes(staticParamsCast.provider as string)) {
throw new Error(
"Improper configure: Invalid provider parameter: '" +
staticParamsCast.provider +
"'. Valid values are : " +
supportedProviders.join(', ')
staticParamsCast.provider +
"'. Valid values are : " +
supportedProviders.join(', ')
);
}
}
Expand Down

0 comments on commit fb89310

Please sign in to comment.