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,
  },
};

林东吴
  • 171
  • 1
  • 8

1 Answers1

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

Nero
  • 21
  • 4