Skip to content

Commit 1d66a28

Browse files
committed
chore: remove async for hasPackageBundleAliases
1 parent 5d5e1c4 commit 1d66a28

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/sfProject.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ export class SfProjectJson extends ConfigFile<ConfigFile.Options, ProjectJson> {
375375
/**
376376
* Has at least one package bundle alias defined in the project.
377377
*/
378-
// eslint-disable-next-line @typescript-eslint/require-await
379-
public async hasPackageBundleAliases(): Promise<boolean> {
378+
public hasPackageBundleAliases(): boolean {
380379
return Object.keys(this.getContents().packageBundleAliases ?? {}).length > 0;
381380
}
382381

test/unit/project.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -968,15 +968,15 @@ describe('SfProject', () => {
968968
const project = SfProject.getInstance();
969969
expect(project.getSfProjectJson().getPackageBundleAliases()).to.be.undefined;
970970
});
971-
it('should return false when no bundle aliases are defined', async () => {
971+
it('should return false when no bundle aliases are defined', () => {
972972
$$.setConfigStubContents('SfProjectJson', {
973973
contents: {},
974974
});
975975

976976
const project = SfProject.getInstance();
977-
expect(await project.getSfProjectJson().hasPackageBundleAliases()).to.be.false;
977+
expect(project.getSfProjectJson().hasPackageBundleAliases()).to.be.false;
978978
});
979-
it('should return true when at least one bundle alias is defined', async () => {
979+
it('should return true when at least one bundle alias is defined', () => {
980980
$$.setConfigStubContents('SfProjectJson', {
981981
contents: {
982982
packageBundleAliases: {
@@ -986,7 +986,7 @@ describe('SfProject', () => {
986986
});
987987

988988
const project = SfProject.getInstance();
989-
expect(await project.getSfProjectJson().hasPackageBundleAliases()).to.be.true;
989+
expect(project.getSfProjectJson().hasPackageBundleAliases()).to.be.true;
990990
});
991991
it('should return the defined package aliases', () => {
992992
$$.setConfigStubContents('SfProjectJson', {

0 commit comments

Comments
 (0)