Skip to content

ternary expression multi-level indentation #777

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('');
    },

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions