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
spritzel
@spritzel
Hi :) was trying to find more info about using stylelint together with frameworks like bourbon neat
the variables that they generate seem to make stylelint fall on its nose
[12:54:29] 'lint-css' errored after 891 ms
[12:54:29] Error in plugin 'gulp-postcss'
Message:
    Expected pseudo-class or pseudo-element
this is the kind of error I'm getting
Oleg Sklyanchuk
@olegskl
That might be an error in gulp-postcss (or you're missing some plugin).
spritzel
@spritzel
hmm seems like it, researching a bit it seems I'm not the only one having this kind of issue
I was trying to think of some ways to handle it
Oleg Sklyanchuk
@olegskl
I guess you need to somehow preprocess sass variables.
Afaik there's a plugin for handling sass in postcss.
I haven't tried it though.
Hmmm.
spritzel
@spritzel
gulp.task('lint-css', function lintCssTask() {
    var stylelintConfig = {
        'plugins': [
          'stylelint-statement-max-nesting-depth'
        ],
        'rules': {
         //rules
          'selector-pseudo-element-colon-notation': 'single',
          'statement-max-nesting-depth': [2, { countAtRules: true }],
        }
    };
    var processors = [
        stylelint(stylelintConfig),
        // Pretty reporting config
        reporter({
          clearMessages: false,
          throwError: false
        }),
      ];

  return gulp
    .src('src/**/*.scss')
//    .pipe(postcss(processors, {syntax: scss}))
    .pipe(postcss(processors, {syntax: scss}, {}));
});
here's my gulp task, I thought specifying the syntax would take care of taht
was thinking...can I have multilple .stylelintrc files?
I could have one dotfile with very loose rules (or none) in the folders that are causing these problems so that they don't get parsed
or ignoreFiles:
Oleg Sklyanchuk
@olegskl
I think you can try multiple .stylelintrc files. But I'm not sure why the above fails.
spritzel
@spritzel
yea...it doesn't say where exactly it's failing
so an empty dotfile will not enforce any rules?
or does it fall back to default?
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