Skip to content

Commit

Permalink
Tweak stylelint config (#38228)
Browse files Browse the repository at this point in the history
* rename to .stylelintrc.json
* add reportInvalidScopeDisables to config
* move reportNeedlessDisables to config
* merge the two configs
* remove unneeded disabled rules from the examples config
  • Loading branch information
XhmikosR authored Mar 15, 2023
1 parent 474bf2a commit c400653
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 60 deletions.
40 changes: 0 additions & 40 deletions .stylelintrc

This file was deleted.

60 changes: 60 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"extends": [
"stylelint-config-twbs-bootstrap"
],
"reportInvalidScopeDisables": true,
"reportNeedlessDisables": true,
"overrides": [
{
"files": "**/*.scss",
"rules": {
"declaration-property-value-disallowed-list": {
"border": "none",
"outline": "none"
},
"function-disallowed-list": [
"calc",
"lighten",
"darken"
],
"property-disallowed-list": [
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"transition"
],
"scss/dollar-variable-default": [
true,
{
"ignore": "local"
}
],
"scss/selector-no-union-class-name": true
}
},
{
"files": "scss/**/*.{test,spec}.scss",
"rules": {
"scss/dollar-variable-default": null,
"declaration-no-important": null
}
},
{
"files": "site/**/*.scss",
"rules": {
"scss/dollar-variable-default": null
}
},
{
"files": "site/**/examples/**/*.css",
"rules": {
"comment-empty-line-before": null,
"property-no-vendor-prefix": null,
"selector-no-qualifying-type": null,
"value-no-vendor-prefix": null
}
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"css-compile": "sass --style expanded --source-map --embed-sources --no-error-css scss/:dist/css/",
"css-rtl": "cross-env NODE_ENV=RTL postcss --config build/postcss.config.js --dir \"dist/css\" --ext \".rtl.css\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*.rtl.css\"",
"css-lint": "npm-run-all --aggregate-output --continue-on-error --parallel css-lint-*",
"css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache --rd",
"css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache",
"css-lint-vars": "fusv scss/ site/assets/scss/",
"css-minify": "npm-run-all --aggregate-output --parallel css-minify-*",
"css-minify-main": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*rtl*.css\"",
Expand Down
2 changes: 0 additions & 2 deletions site/assets/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// stylelint-disable scss/dollar-variable-default

// Local docs variables
$bd-purple: #4c0bce;
$bd-violet: lighten(saturate($bd-purple, 5%), 15%); // stylelint-disable-line function-disallowed-list
Expand Down
4 changes: 2 additions & 2 deletions site/assets/scss/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
@import "../../../scss/mixins";

// fusv-disable
$enable-grid-classes: false; // stylelint-disable-line scss/dollar-variable-default
$enable-cssgrid: true; // stylelint-disable-line scss/dollar-variable-default
$enable-grid-classes: false;
$enable-cssgrid: true;
// fusv-enable
@import "../../../scss/grid";

Expand Down
15 changes: 0 additions & 15 deletions site/content/docs/5.3/examples/.stylelintrc

This file was deleted.

0 comments on commit c400653

Please sign in to comment.