webpack-contrib/stylelint-webpack-plugin

Failed to compile although `failOnError: false`

MatanYadaev opened this issue · 3 comments

  • Operating System: Mac
  • Node Version: v13.11.0
  • NPM Version: v6.13.7
  • webpack Version: v4.42.1
  • stylelint-webpack-plugin Version: v1.2.3

Expected Behavior

Keep compile regularly when there are stylelint errors and failOnError is false.

Actual Behavior

Compile fails when there are stylelint errors and failOnError is false.

Code

new StyleLintPlugin({
  files: ['**/*.{vue,scss}'],
  failOnError: false,
}),
{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-recommended-scss",
    "stylelint-config-rational-order"
  ]
}
#help-popover {
  width: 100%;
  z-index: 9;
}

How Do We Reproduce?

Use the same configuration as mine and try to break a rule.

Hi @MatanYadaev

  • failOnError is disable by default, if enable and contains any errors on stylelint the build not is emmited

Perhaps what you want to use is emitWarning to convert errors into warnings

Try this:

new StyleLintPlugin({
  files: ['**/*.{vue,scss}'],
  emitWarning: true, // convert erros to warnings
  quiet: true // tip: disable the warnings
}),

@ricardogobbosouza Thank you very much, emitWarning is what I needed. Sorry for my misunderstanding. Thanks again! ☺️