Browse Source

Use stylelint for CSS linting

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
d8eac56f5e
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 18
      src/webui/www/.stylelintrc.json
  2. 7
      src/webui/www/package.json

18
src/webui/www/.stylelintrc.json

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
{
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-order"
],
"rules": {
"color-hex-length": null,
"comment-empty-line-before": null,
"comment-whitespace-inside": null,
"declaration-colon-newline-after": null,
"function-name-case": null,
"indentation": 4,
"length-zero-no-unit": null,
"no-descending-specificity": null,
"value-keyword-case": null,
"order/properties-alphabetical-order": true
}
}

7
src/webui/www/package.json

@ -7,12 +7,15 @@ @@ -7,12 +7,15 @@
},
"scripts": {
"format": "js-beautify private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && prettier --write **.css",
"lint": "eslint private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js"
"lint": "eslint private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint **/*.css"
},
"devDependencies": {
"eslint": "*",
"eslint-plugin-html": "*",
"js-beautify": "*",
"prettier": "*"
"prettier": "*",
"stylelint": "*",
"stylelint-config-standard": "*",
"stylelint-order": "*"
}
}

Loading…
Cancel
Save