Skip to content

Commit

Permalink
AXON-72: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cabella-dot committed Feb 12, 2025
1 parent 891488f commit 6c181c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export class Container {
analyticsApi: VSCAnalyticsApi,
bitbucketHelper: CheckoutHelper,
) {
if(FeatureFlagClient.checkGate(Features.EnableNewUriHandler)){
if (FeatureFlagClient.checkGate(Features.EnableNewUriHandler)) {
console.log('Using new URI handler');
context.subscriptions.push(AtlascodeUriHandler.create(analyticsApi, bitbucketHelper));
} else {
Expand Down
9 changes: 5 additions & 4 deletions src/util/featureFlags/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class FeatureFlagClient {
});
})
.then(() => {
// console log all feature gates and values
// console log all feature gates and values
for (const feat of Object.values(Features)) {
console.log(`FeatureGates: ${feat} -> ${FeatureGates.checkGate(feat)}`);
}
Expand All @@ -55,12 +55,12 @@ export class FeatureFlagClient {
}

public static checkGate(gate: string) {
var gateValue = false
if( FeatureGates == null) {
var gateValue = false;
if (FeatureGates === null) {
console.warn('FeatureGates: FeatureGates is not initialized. Defaulting to False');
} else {
// FeatureGates.checkGate returns false if any errors
gateValue = FeatureGates.checkGate(gate);
gateValue = FeatureGates.checkGate(gate);
}
console.log(`FeatureGates: ${gate} -> ${gateValue}`);
return gateValue;
Expand All @@ -70,6 +70,7 @@ export class FeatureFlagClient {
const featureFlags = await Promise.all(
Object.values(Features).map(async (feature) => {
return {
// eslint-disable-next-line @typescript-eslint/await-thenable
[feature]: await this.checkGate(feature),
};
}),
Expand Down

0 comments on commit 6c181c4

Please sign in to comment.