csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

CSSComb for SublimeText 3 not working with .SASS files. #97

Closed adonaicandido closed 5 years ago

adonaicandido commented 9 years ago

Using the latest version of SublimeText3 and just installed CSSComb through Package Installer.

My .sass file:

section
    position: absolute
    width: 100%
    height: 100%

    header
        position: absolute
        left: 30vw
        width: 640px

        h1
            font-size: 32px
            font-weight: 700
            letter-spacing: 4px
            &:after
                width: 24px
                height: 4px
                background-color: black
                border: none
                content: ''
                display: block

I hit CTRL+SHIT+C and I get this error:

CSScomb error:

/Users/Adonai/Library/Application Support/Sublime Text 3/Packages/CSScomb/node_modules/csscomb/node_modules/csscomb-core/lib/core.js:412
            throw e;
                  ^

Please check the validity of the block starting from line #1

1*| section
2 |     position: absolute
3 |     width: 100%

Gonzales PE version: 3.0.0-10
CSScomb Core version: 2.0.2

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/16007062-csscomb-for-sublimetext-3-not-working-with-sass-files?utm_campaign=plugin&utm_content=tracker%2F214563&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F214563&utm_medium=issues&utm_source=github).
petereberlecom commented 9 years ago

@adonaicandido do you have an solution already? I'm dealing with the same issue right now

kevinchevallier commented 8 years ago

Got error too with sass files on ST3:

CSScomb error:

/Users/kc/Library/Application Support/Sublime Text 3/Packages/CSScomb/node_modules/csscomb/node_modules/csscomb-core/lib/core.js:412
            throw e;
            ^

Please check the validity of the block starting from line #1

1*| @import ../../assets/styles/globals/variables
2 | @import ../../assets/styles/globals/mixins

Gonzales PE version: 3.0.0-10
CSScomb Core version: 2.0.2

A solution would be great.

Liquir-ice commented 7 years ago

This solution fix my problem.

# Check is installed nodejs or not
$ node -v
v7.1.0
$ which node
/usr/local/bin/node
# Change the node-path in sublime csscomb setting
{
  "node-path" : ":/usr/local/bin"
}

Install sass/scss package in sublime

Set current file syntax to scss type in sublime Sublime Toolbar->view->syntax->scss

Press ctrl+shift +c to run "CSScomb"

jdalton commented 5 years ago

Please report the issue to sublime-csscomb if it is still a problem.