Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

ter-indent: Does not report missing indents in chains and ternaries #373

@woutervanvliet

Description

@woutervanvliet

I'm trying to configure ter-indent to behave as similar to the eslint indent rule I've been using for a while, and for the most part this seems to function alright. However in some cases it doesn't report missing indents - where eslint does.

Specifically, I've identified the problem in the following cases:

// Here I would like to force an indent before ? and before :
export const theValue = document.location.search === ""
? "empty-search"
: "not-empty-search";

// here I'd like to force an indent before .
export const zero = ["one"]
.map((hi) => hi.toUpperCase());

I've setup a minimal repo to demonstrate the issue: https://github.com/woutervanvliet/ter-indent-problem

Would this be something that can be fixed? Or is there some configuration property I'm missing that can enable the desired behaviour in my project?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions