Skip to content

ternary expression multi-level indentation #777

@kaivean

Description

@kaivean

Version: 0.51.1

expectation:ternary expression multi-level indentation , consistent with ESLint

    kebabToCamel(str: string): string {
        return arr
            .map((word, index) => (index === 0
                ? ''
                : index === 1
                    ? word.toLowerCase()
                    : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
            )
            .join('');
    },

Actual:

    kebabToCamel(str: string): string {
        return str
            .split('-')
            .map((word, index) => (index === 0
                ? ''
                : index === 1
                ? word.toLowerCase()
                : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
            )
            .join('');
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions