Thank you, Ilya. I supposed so. This choice of indentation multiplier is a 
little unfortunate, I don't see why would be useful to use any other value 
than 0 or 1. Would be better to be an exact number of spaces or separate 
rule.



W dniu sobota, 29 kwietnia 2017 21:53:59 UTC+2 użytkownik Ilya Volodin 
napisał:
>
> You are correct. With base indentation of 4 spaces, it’s not possible to 
> align `const`s. This is due to historical reasons (using multipliers of 
> base in configuration), that we wouldn’t be able to change now.
>
>  
>
> Thanks,
>
>  
>
> Ilya Volodin
>
>  
>
> *From:* [email protected] <javascript:> [mailto:
> [email protected] <javascript:>] *On Behalf Of *[email protected] 
> <javascript:>
> *Sent:* Saturday, April 29, 2017 3:25 PM
> *To:* ESLint <[email protected] <javascript:>>
> *Cc:* [email protected] <javascript:>
> *Subject:* Re: [ESLint] Align var, let and const
>
>  
>
> Have you even read my entire post?
>
>
>
> W dniu sobota, 29 kwietnia 2017 17:18:16 UTC+2 użytkownik Nicholas Zakas 
> napisał:
>
> Yes, you need to use the VariableDeclarator option. From the docs:
>
> > Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, 
> "const": 3} will indent the multi-line variable declarations with 4 spaces 
> for var and let, 6 spaces for const statements.
>
> See http://eslint.org/docs/rules/indent#options for more information on 
> how to configure the rule. 
>
> On Sat, Apr 29, 2017 at 3:00 AM <[email protected]> wrote:
>
> Hi guys,
>
>  
>
> can ESLint force alignment of var, let *and const* blocks? I know it can 
> do var and let, but what about the const?
>
>  
>
> var start = 0,
>
>     end = 10;
>
>  
>
> let start = 0,
>
>     end = 10;
>
>  
>
> const start = 0,
>
>       end = 10;
>
>  
>
> I'm using indent rule, but it can only take a multiplication of basic 
> indentation as a parameter and that must be an integer. My base is 4, so it 
> doesn't seem possible to align const block like that. It is possible for 
> var and let, but only because they indeed take 4 characters to align.
>
>  
>
> Am I missing some feature?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to