Skip to content

feat(lint): require named options for multiple boolean flags - #168

Draft
jcosta33 wants to merge 1 commit into
codex/no-conditional-object-spreadfrom
codex/no-positional-boolean-flags
Draft

jcosta33 wants to merge 1 commit into
codex/no-conditional-object-spreadfrom
codex/no-positional-boolean-flags

Conversation

@jcosta33

@jcosta33 jcosta33 commented Dec 2, 2026 •

Copy link
Copy Markdown

Report two or more boolean parameters as errors in both base configs. The rule counts explicit boolean annotations and literal boolean defaults. Named options make calls easier to read. Direct callback arguments, JSX callback props, and explicitly typed implementations keep the signature their API supplies.

Example

Before

export function createExportRequest(includeMetadata: boolean, overwrite = false) {
    return { includeMetadata, overwrite };
}

export const request = createExportRequest(true, false);

Corrected

type CreateExportRequestOptions = {
    includeMetadata: boolean;
    overwrite?: boolean;
};

export function createExportRequest({ includeMetadata, overwrite = false }: CreateExportRequestOptions) {
    return { includeMetadata, overwrite };
}

export const request = createExportRequest({
    includeMetadata: true,
    overwrite: false,
});

Parent #167

Child #169

@changeset-bot

changeset-bot Bot commented Dec 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 98662cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@frontify/eslint-config-basic Minor
@frontify/eslint-config-react Minor
@frontify/eslint-plugin Patch
@frontify/oxlint-config-basic Minor
@frontify/oxlint-config-react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant