Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested maps whitespacing does not lint correctly #783

Closed
roelvanhintum opened this issue Jul 12, 2016 · 3 comments · Fixed by #814
Closed

Nested maps whitespacing does not lint correctly #783

roelvanhintum opened this issue Jul 12, 2016 · 3 comments · Fixed by #814
Labels

Comments

@roelvanhintum
Copy link

Nested maps whitespacing does not lint correctly with sass-lint 1.8.2
The issue is consistent with sass-loader@3.2.3 and Atom's linter-sass-lint@1.6.1.
I'm using a Mac 10.11.5.

$textsizes: (
    xs: (
        s: 10px,
        m: 10px,
        l: 11px,
        xl: 11px
    ),
    s: (
        s: 12px,
        m: 13px,
        l: 14px,
        xl: 16px
    ),
    m: (
        s: 14px,
        m: 16px,
        l: 18px,
        xl: 20px
    ),
    l: (
        s: 16px,
        m: 18px,
        l: 20px,
        xl: 22px
    ),
    xl: (
        s: 20px,
        m: 24px,
        l: 28px,
        xl: 32px
    ),
    xxl: (
        s: 32px,
        m: 36px,
        l: 40px,
        xl: 48px
    ),
    xxxl: (
        s: 32px,
        m: 36px,
        l: 40px,
        xl: 48px
    )
);

Result:

./src/sass/variables/_font-sizes.scss
  40:5  warning  Expected indentation of 12 spaces but found 4  indentation
  41:9  warning  Expected indentation of 16 spaces but found 8  indentation
  42:9  warning  Expected indentation of 16 spaces but found 8  indentation
  43:9  warning  Expected indentation of 16 spaces but found 8  indentation
  44:9  warning  Expected indentation of 16 spaces but found 8  indentation
  46:5  warning  Expected indentation of 16 spaces but found 4  indentation
  47:9  warning  Expected indentation of 20 spaces but found 8  indentation
  48:9  warning  Expected indentation of 20 spaces but found 8  indentation
  49:9  warning  Expected indentation of 20 spaces but found 8  indentation
  50:9  warning  Expected indentation of 20 spaces but found 8  indentation
  52:5  warning  Expected indentation of 20 spaces but found 4  indentation
  53:9  warning  Expected indentation of 24 spaces but found 8  indentation
  54:9  warning  Expected indentation of 24 spaces but found 8  indentation
  55:9  warning  Expected indentation of 24 spaces but found 8  indentation
  56:9  warning  Expected indentation of 24 spaces but found 8  indentation
  58:5  warning  Expected indentation of 24 spaces but found 4  indentation
  59:9  warning  Expected indentation of 28 spaces but found 8  indentation
  60:9  warning  Expected indentation of 28 spaces but found 8  indentation
  61:9  warning  Expected indentation of 28 spaces but found 8  indentation
  62:9  warning  Expected indentation of 28 spaces but found 8  indentation
  64:5  warning  Expected indentation of 28 spaces but found 4  indentation
  65:9  warning  Expected indentation of 32 spaces but found 8  indentation
  66:9  warning  Expected indentation of 32 spaces but found 8  indentation
  67:9  warning  Expected indentation of 32 spaces but found 8  indentation
  68:9  warning  Expected indentation of 32 spaces but found 8  indentation
  70:5  warning  Expected indentation of 32 spaces but found 4  indentation
  71:9  warning  Expected indentation of 36 spaces but found 8  indentation
  72:9  warning  Expected indentation of 36 spaces but found 8  indentation
  73:9  warning  Expected indentation of 36 spaces but found 8  indentation
  74:9  warning  Expected indentation of 36 spaces but found 8  indentation

Indentation setting (yml):

indentation:
    - 1
    - size: 4
@DanPurdy DanPurdy added the bug label Jul 12, 2016
@DanPurdy
Copy link
Member

DanPurdy commented Aug 6, 2016

Hey @roelvanhintum Do you happen to have some @imports above this map?

@roelvanhintum
Copy link
Author

No, there is just some variables and there was a function definition. The function turned out to be the problem. I moved the function to a separate file, which solved it.

@function em($pixels, $context: $font-size-base) {
    @return #{($pixels / $context)}rem;
}

@DanPurdy
Copy link
Member

DanPurdy commented Aug 8, 2016

Thanks I'll check it out, found a problem with certain at-rules and maps so I'll check this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants