数据可视化大屏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.7KB

  1. const { propertyGroups } = require('stylelint-config-clean-order');
  2. const propertiesOrder = propertyGroups.map(properties => ({
  3. noEmptyLineBetween: true,
  4. emptyLineBefore: 'never',
  5. properties
  6. }));
  7. module.exports = {
  8. extends: ['stylelint-config-standard'],
  9. customSyntax: 'postcss-less',
  10. plugins: ['stylelint-order', 'stylelint-declaration-block-no-ignored-properties'],
  11. rules: {
  12. 'function-no-unknown': null,
  13. 'no-descending-specificity': null,
  14. 'plugin/declaration-block-no-ignored-properties': true,
  15. 'selector-type-no-unknown': [
  16. true,
  17. {
  18. ignoreTypes: ['/^g2-/', '/^nz-/', '/^app-/']
  19. }
  20. ],
  21. 'selector-pseudo-element-no-unknown': [
  22. true,
  23. {
  24. ignorePseudoElements: ['ng-deep']
  25. }
  26. ],
  27. 'import-notation': 'string',
  28. 'media-feature-range-notation': 'prefix',
  29. 'media-query-no-invalid': null,
  30. 'order/order': [
  31. [
  32. 'dollar-variables',
  33. 'at-variables',
  34. 'custom-properties',
  35. { type: 'at-rule', name: 'custom-media' },
  36. { type: 'at-rule', name: 'function' },
  37. { type: 'at-rule', name: 'mixin' },
  38. { type: 'at-rule', name: 'extend' },
  39. { type: 'at-rule', name: 'include' },
  40. 'declarations',
  41. 'less-mixins',
  42. {
  43. type: 'rule',
  44. selector: /^&::[\w-]+/,
  45. hasBlock: true
  46. },
  47. 'rules',
  48. { type: 'at-rule', name: 'media', hasBlock: true }
  49. ],
  50. { severity: 'warning' }
  51. ],
  52. 'order/properties-order': [
  53. propertiesOrder,
  54. {
  55. severity: 'warning',
  56. unspecified: 'bottomAlphabetical'
  57. }
  58. ]
  59. },
  60. ignoreFiles: ['src/assets/**/*']
  61. };