0

I want to create a rule in lesshint to sort the CSS properties as per declaration order like this:

"sort-order": [
  [
    "font",
    "font-family"
  ],
  [
    "top",
    "position"
  ],
  [
    "color"
  ]
]

it's not working well. It does not throw any error.

mahil
  • 33
  • 10
  • Is this gulp-lesshint? It doesn't look like it sorts - as a linter I wouldn't expect it to be able to sort. – Mark Jul 02 '18 at 20:21
  • Yes, its in gulp-lesshint. The code above is incorrect, so it does not sort. But even there are no errors when I run this – mahil Jul 03 '18 at 05:20
  • I'm saying that I don't think gulp-lesshint can sort. I don't see it that it has that option. Where did you get the "sort-order" option from? – Mark Jul 03 '18 at 05:41
  • Yes It does not have this option, I was trying to create a custom one – mahil Jul 03 '18 at 06:00
  • Do you have a link to where that option is shown? I don't see it in the gulp-lesshint documentation. – Mark Jul 03 '18 at 06:03
  • It's not from the gulp-lesshint documentation. Something similar to it is there in stylelint – mahil Jul 03 '18 at 06:26
  • 1
    I think you need something like cssbrush or csscomb, see https://www.npmjs.com/package/cssbrush. You can't create a new sort-order option for lesshint if it doesn't support it. – Mark Jul 03 '18 at 06:50
  • Alright. Thanks, Mark for quick replies. – mahil Jul 03 '18 at 07:14

0 Answers0