by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 20 2018 09:49
  • Nov 13 2018 09:26
    dsine-de starred olegskl/gulp-stylelint
  • Nov 05 2018 10:05
    klihelp starred olegskl/gulp-stylelint
  • Nov 05 2018 08:35
    obuisan starred olegskl/gulp-stylelint
  • Oct 30 2018 18:00
    XhmikosR starred olegskl/gulp-stylelint
  • Oct 24 2018 12:23
    olegskl commented #105
  • Oct 24 2018 12:15

    olegskl on 8.0.0

    (compare)

  • Oct 24 2018 12:15

    olegskl on master

    chore(package): bump version to… (compare)

  • Oct 24 2018 12:11

    olegskl on master

    Fix reporting for ignored files Add node > 6, node <= 10 to tra… Enforce stylelint@^9.6.0 (compare)

  • Oct 24 2018 12:11
    olegskl closed #105
  • Oct 20 2018 22:20
    mtvphnx starred olegskl/gulp-stylelint
  • Oct 20 2018 22:20
    mtvphnx commented #105
  • Oct 17 2018 11:01
    ilyagorev starred olegskl/gulp-stylelint
  • Oct 16 2018 22:05
    Azein commented #105
  • Oct 16 2018 11:17
    perrin4869 synchronize #105
  • Oct 16 2018 08:07
    perrin4869 commented #105
  • Oct 16 2018 07:59
    perrin4869 synchronize #105
  • Oct 16 2018 07:57
    perrin4869 synchronize #105
  • Oct 16 2018 07:21
    perrin4869 commented #105
  • Oct 16 2018 07:20
    perrin4869 synchronize #105
Oleg Sklyanchuk
@olegskl
Normally there's no "default".
spritzel
@spritzel
sorry just started playing around with this last night :)
Oleg Sklyanchuk
@olegskl
spritzel
@spritzel
yea I'm using it
in the last line of my gulp task
Oleg Sklyanchuk
@olegskl
You might want to open an issue on their repo then.
spritzel
@spritzel
will do that
spritzel
@spritzel
not sure this works, with an empty .stylerc file
Oleg Sklyanchuk
@olegskl
You can pass configuration directly to stylelint.
No need to have a .stylelintrc
spritzel
@spritzel
how do you mean?
I am trying to give a different config file inside of the bourbon and neat folders, so that stylelint can use much looser rules on them
then I would have a 'global' config to parse the styles that we actually wrote (i.e. not generated)
Oleg Sklyanchuk
@olegskl
In your task this is the configuration (see rules):
var stylelintConfig = {
        'plugins': [
          'stylelint-statement-max-nesting-depth'
        ],
        'rules': {
         //rules
          'selector-pseudo-element-colon-notation': 'single',
          'statement-max-nesting-depth': [2, { countAtRules: true }],
        }
    };
But I don't think relaxing the rules will solve the problem.
spritzel
@spritzel
yea it didn't :/
was reading something about an ignorefiles option but that seemed pretty experimental as well
Oleg Sklyanchuk
@olegskl
Well, you can always ignore files with gulp.src
Anyway, I believe that the error occurs even before stylelint runs.
spritzel
@spritzel
actually if I ignore styles/bourbon and styles/neat it goes through fine
no errors
not the most elegant solution but it'll do until something better comes up! :)
Oleg Sklyanchuk
@olegskl
Yeah. But of course you're not linting them :)
You might want to open an issue on postcss-scss
spritzel
@spritzel
yea,
thinking about how to phrase it!
uhmm yea I'm not linting them, but I think those are generated stylesheet
for now just worry about linting what our devs wrote :)
Oleg Sklyanchuk
@olegskl
:)
spritzel
@spritzel
postcss/postcss-scss#23
FYI
not sure if it's properly worded
Oleg Sklyanchuk
@olegskl
Just wanted to mention that you aren't actually using gulp-stylelint :P
spritzel
@spritzel
oh dang
lol
you're right, I've been experimenting a bunch, I was still requiring gulp-stylelint but it wasnt in use
thanks for your help anyways
Oleg Sklyanchuk
@olegskl
^_^
Wei
@xowei

hey guys, i have one problem when using gulp-stylelint
It gave me a error message below:

Error in plugin 'gulp-stylelint'
Message:
    No configuration found
Details:
    code: 78

my gulp task is like this:

gulp.task('lint-css', function() {

  var stylelintConfig = {
    'plugins': [
      'stylelint-statement-max-nesting-depth'
    ],
    'rules': {
      'selector-pseudo-element-colon-notation': 'single',
      'statement-max-nesting-depth': [2, { countAtRules: true }],
    }
  };

  return gulp.src(src + css + cofiles)
    .pipe($.stylelint(stylelintConfig));
});
hope someone can help me, sorry for my bad english..
Oleg Sklyanchuk
@olegskl
Hello, what version of gulp-stylelint are you using?
Wei
@xowei
@olegskl I use 2.0.2
Oleg Sklyanchuk
@olegskl
gulp-stylelint takes an object of stylelint options (http://stylelint.io/user-guide/node-api/#options), so you need to add a config property that points to the actual config.
.pipe($.stylelint({config: stylelintConfig}));
Wei
@xowei
@olegskl Thank you! I fixed it!
Wei
@xowei

sorry, i have another problem now =(
This is my stylelintConfig

  var stylelintConfig = {
    "rules": {
      "block-no-empty": null,
      "color-no-invalid-hex": true,
      "comment-empty-line-before": [ "always", {
        "ignore": ["stylelint-commands", "between-comments"],
      } ],
      "declaration-colon-space-after": "always-single-line",
      "indentation": 2,
      "rule-nested-empty-line-before": [ "always-multi-line", {
        "except": ["first-nested"],
        "ignore": ["after-comment"],
      } ],
      "unit-whitelist": ["em", "rem", "%", "s", "deg"]
    }
  };

This is my nav.css file

nav {
  ul {
   margin: 0;
   padding: 0;
  }
}

error message is:

src/css/layout/nav.css
2:3     ‼  Expected indentation of 0 spaces (indentation) [stylelint]

What happen? Please help me~

Oleg Sklyanchuk
@olegskl
I've set up a test case for you:
const gulp = require('gulp');
const stylelint = require('gulp-stylelint');

gulp.task('lint', function () {
  const stylelintConfig = {
    "rules": {
      "block-no-empty": null,
      "color-no-invalid-hex": true,
      "comment-empty-line-before": [ "always", {
        "ignore": ["stylelint-commands", "between-comments"],
      } ],
      "declaration-colon-space-after": "always-single-line",
      "indentation": 2,
      "rule-nested-empty-line-before": [ "always-multi-line", {
        "except": ["first-nested"],
        "ignore": ["after-comment"],
      } ],
      "unit-whitelist": ["em", "rem", "%", "s", "deg"]
    }
  };

  gulp.src('*.css')
    .pipe(stylelint({
      config: stylelintConfig,
      reporters: [
        {formatter: 'string', console: true}
      ],
    }));
});
now, if you run gulp lint you'll get:
foo.css
 3:4  ✖  Expected indentation of 4 spaces   indentation
 4:4  ✖  Expected indentation of 4 spaces   indentation