google / eslint-config-google

ESLint shareable config for the Google JavaScript style guide
Apache License 2.0
1.74k stars 140 forks source link

[Question] Why is "ConditionalExpression" ignored in the "indent" config? #64

Open t-rad679 opened 4 years ago

t-rad679 commented 4 years ago

This does not match the style guide and seems generally like an unintuitive choice. What's up wit dat?

t-rad679 commented 4 years ago

After playing around with it some more, I think I misunderstood what this does. I previously thought ignoring a node meant that ESLint would apply the default rules to those nodes, but now I am under the impression it means to apply no rules to the node. My question remains, however, along with an additional one:

There doesn't seem to be an indent config option for ConditionalExpression (or at least I can't find one). This seems like a gross oversight; I can't get my ternary expressions to match with everything else, and I'm not sure why this would be excluded.

t-rad679 commented 4 years ago

I guess the second question might be good to ask the ESLint project. Please excuse the asking of an irrelevant question.