That worked! Thanks! I now use:
"indent": [
2, "tab", {"SwitchCase": 1}
],
Op zondag 23 augustus 2015 11:20:12 UTC+2 schreef Burak Yiğit Kaya:
>
> Yup, you need the `SwitchIndent` rule. Look here:
> http://eslint.org/docs/rules/indent
>
> On Sat, Aug 22, 2015 at 10:32 AM Michael Sperber <[email protected]
> <javascript:>> wrote:
>
>> Hi
>>
>> I'm new to eslint. My first go with the tool yielded two errors i don't
>> understand (but for clarity, I'll ask one at the time)
>>
>> I have this code:
>> switch (networkState) {
>> case Connection.ETHERNET:
>> case Connection.WIFI:
>> case Connection.CELL_2G:
>> case Connection.CELL_3G:
>> case Connection.CELL_4G:
>> case Connection.CELL:
>> networkOn = true;
>> break;
>> .... etc
>>
>> Eslint gives me this error: "Expected indentation of 1 tab character but
>> found 2"
>> this is on the line of all the case statements.
>>
>> Is this wrong? I always indent after a line which ends with a curly brace
>> and in functions and "for" etc eslint is OK with that.
>> Maybe a config setting somewhere?
>>
>> --
>> 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.