0

Is it possible to have a nested property list and let do stylelint it's work? I tried to do this, but I got the following error:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Expected pseudo-class or pseudo-element

I tried it with this code:

padding: {
    left: 20px;
    top: 30px;
}

And this is the configuration I use at the moment:

"rules": {
    "block-no-empty": true,
    "color-no-invalid-hex": true,
    "declaration-colon-space-after": "always",
    "declaration-colon-space-before": "never",
    "function-comma-space-after": "always",
    "function-url-quotes": "double",
    "media-feature-colon-space-after": "always",
    "media-feature-colon-space-before": "never",
    "media-feature-name-no-vendor-prefix": true,
    "max-empty-lines": 5,
    "number-leading-zero": "never",
    "number-no-trailing-zeros": true,
    "property-no-vendor-prefix": true,
    "rule-no-duplicate-properties": true,
    "declaration-block-no-single-line": true,
    "rule-trailing-semicolon": "always",
    "selector-list-comma-space-before": "never",
    "selector-list-comma-newline-after": "always",
    "selector-no-id": true,
    "string-quotes": "double",
    "value-no-vendor-prefix": true
}

Or is there another SCSS linter without using Ruby gems?

It might be useful to have this information:

These are my vars:

var postcss     = require('gulp-postcss');
var reporter    = require('postcss-reporter');
var syntax_scss = require('postcss-scss');
var stylelint   = require('stylelint');

And at the bottom of the file is this:

var processors = [
            stylelint(stylelintConfig),
            reporter({
                clearMessages: true,
                throwError: false
            })
        ];

        gulp.src('style.scss')
                .pipe(postcss(
                    processors, {
                        syntax: syntax_scss
                }));

I followed a tutorial like this one: http://www.creativenightly.com/2016/02/How-to-lint-your-css-with-stylelint/

And changed some bits in my code to work with the rest of the website.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Did you follow these instructions for using un-compiled SCSS with stylelint? http://stylelint.io/user-guide/css-processors/#parsing-scss – davidtheclark Mar 04 '16 at 14:46
  • Please try this again. Changes to stylelint might make this possible now, uncompiled. – davidtheclark May 12 '16 at 14:29
  • `function-url-quotes` rule accepts only "always" or "never" options, not "double", see: https://stylelint.io/user-guide/rules/list/function-url-quotes/ – Klemart3D Jul 29 '22 at 14:04

1 Answers1

0

This issue is due to the code not being valid css but is valid for scss.

Related: https://github.com/stylelint/stylelint/issues/1386#issuecomment-223266044

s10wen
  • 193
  • 2
  • 7