Skip to content

Commit

Permalink
fix: make eslint happy (enums, unknown>
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Nov 13, 2023
1 parent b44e63c commit 940c03a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ export abstract class SfCommand<T> extends Command {
this.ux.styledHeader(text);
}

// eslint-disable-next-line class-methods-use-this
// leaving AnyJson and unknown to maintain the public API.
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-redundant-type-constituents
public logJson(json: AnyJson | unknown): void {
// If `--json` is enabled, then the ux instance on the class will disable output, which
// means that the logJson method will not output anything. So, we need to create a new
Expand Down
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export function toHelpSection(
const body = vars
.flatMap((v) => {
if (typeof v === 'string') {
const orgConfig = ORG_CONFIG_ALLOWED_PROPERTIES.find(({ key }) => key === v);
const orgConfig = ORG_CONFIG_ALLOWED_PROPERTIES.find(({ key }) => key.toString() === v);
if (orgConfig) {
return { name: orgConfig.key, description: orgConfig.description };
}
const sfdxProperty = SFDX_ALLOWED_PROPERTIES.find(({ key }) => key === v);
const sfdxProperty = SFDX_ALLOWED_PROPERTIES.find(({ key }) => key.toString() === v);
if (sfdxProperty) {
return { name: sfdxProperty.key.valueOf(), description: sfdxProperty.description };
}
Expand Down

0 comments on commit 940c03a

Please sign in to comment.