S
S
someserj2017-03-19 13:24:49
Sass
someserj, 2017-03-19 13:24:49

How to set gulp-sass-lint to indent tabs?

For this plugin https://github.com/sasstools/gulp-sass-lint I am trying to apply indentation. Judging by the instructions, it is size that needs to be set https://github.com/sasstools/sass-lint/blob/develo...
but it doesn’t work, the linter still wants spaces instead of tabs.
how to be?

gulp.src('src/scss/**/*.*')
        .pipe(sassLint({
            rules:{
                "class-name-format" : 0,
                "no-important" : 0,
                "property-sort-order" : 0,
                "indentation" : {
                    "size" : "tab"
                }
            }
        }))
        .pipe(sassLint.format())

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
deeppines, 2017-03-19
@LucasKane

Try this configuration. And it's better to put these settings in a separate .yml file

linters:
    Indentation:
        enabled: true
        allow_non_nested_indentation: false
        character: space # or 'tab'
        width: 4

D
Dmitry Peshkin, 2017-09-10
@ekb196

In fact, in order for everything to work, you need to do this:

rules:{
  "indentation" : [
    1, //будет warning, если 2 то error
    {
      'size': 4
    }
  ]
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question