2

VSCode-Stylelint showing meaningless error:

Error: severity property of a stylelint warning must be either 'error' or 'warning', but it was 'ignore' (string). at stylelintWarningToVscodeDiagnostic (/Users/xxx/.vscode/extensions/shinnn.stylelint-0.51.0/node_modules/stylelint-warning-to-vscode-diagnostic/index.js:40:9) at Array.map () at processResults (/Users/xxxs/shinnn.stylelint-0.51.0/node_modules/stylelint-vscode/index.js:59:18) at stylelintVSCode (/Users/xxx/.vscode/extensions/shinnn.stylelint-0.51.0/node_modules/stylelint-vscode/index.js:144:9)

My .stylelintrc.js

module.exports = {
  defaultSeverity: 'warning',
  extends: [
    'stylelint-config-standard',
    'stylelint-config-css-modules',
    'stylelint-config-rational-order',
    'stylelint-config-prettier',
  ],
  plugins: ['stylelint-order', 'stylelint-declaration-block-no-ignored-properties'],
  rules: {
    'no-descending-specificity': null,
    'plugin/declaration-block-no-ignored-properties': true,
    'declaration-empty-line-before': null,
    'length-zero-no-unit': null,
    'function-whitespace-after': null,
  },
};

1 Answer 1

1

There is something wrong with the newer Version of 'stylelint-config-rational-order'.

If you set it to Version 0.0.4 it works.

There is already an Issue created on Github: https://github.com/constverum/stylelint-config-rational-order/issues/16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.