Skip to content

Commit

Permalink
[TASK] Update stylelint to ^14
Browse files Browse the repository at this point in the history
Commands executed:
  npm install --save-dev grunt-stylelint@^0.18 stylelint@^14.11 stylelint-order stylelint-scss
  npm run build

Resolves: #98267
Releases: main
Change-Id: I06887ef24d7e1f0614b6881624851fbe26fa6617
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75618
Tested-by: core-ci <[email protected]>
Tested-by: Oliver Bartsch <[email protected]>
Tested-by: Benni Mack <[email protected]>
Reviewed-by: Oliver Bartsch <[email protected]>
Reviewed-by: Benni Mack <[email protected]>
  • Loading branch information
benjaminkott authored and bmack committed Sep 6, 2022
1 parent c53a565 commit ba6a5c7
Show file tree
Hide file tree
Showing 75 changed files with 769 additions and 2,096 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ indent_size = 2
indent_size = 2
indent_style = tab

# stylelint
[.stylelintrc]
indent_size = 2

# package.json
[package.json]
indent_size = 2
Expand Down
54 changes: 17 additions & 37 deletions .stylelintrc → Build/.stylelintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"plugins": [
"stylelint-order",
"stylelint-scss"
],
"customSyntax": "postcss-scss",
"rules": {
"at-rule-empty-line-before": [
"always",
Expand Down Expand Up @@ -39,16 +44,10 @@
],
"comment-no-empty": true,
"comment-whitespace-inside": "always",
"custom-property-empty-line-before": "never",
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-redundant-longhand-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
Expand All @@ -59,19 +58,7 @@
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-empty-line-before": [
"always",
{
"except": [
"after-declaration",
"first-nested"
],
"ignore": [
"after-comment",
"inside-single-line-block"
]
}
],
"declaration-empty-line-before": "never",
"font-family-no-duplicate-names": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
Expand Down Expand Up @@ -102,17 +89,10 @@
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"number-leading-zero": "always",
"number-leading-zero": "never",
"number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": [
true,
{
"ignoreProperties": [
"/^scroll-padding/"
]
}
],
"property-no-unknown": true,
"rule-empty-line-before": [
"always-multi-line",
{
Expand Down Expand Up @@ -141,13 +121,13 @@
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": [
true,
{
"ignore": [
"custom-elements"
]
}
],
true,
{
"ignore": [
"custom-elements"
]
}
],
"shorthand-property-no-redundant-values": true,
"string-no-newline": true,
"unit-case": "lower",
Expand Down
2 changes: 1 addition & 1 deletion Build/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = function (grunt) {
},
stylelint: {
options: {
configFile: '<%= paths.root %>.stylelintrc',
configFile: '<%= paths.root %>/Build/.stylelintrc',
},
sass: ['<%= paths.sass %>**/*.scss']
},
Expand Down
41 changes: 13 additions & 28 deletions Build/Sources/Sass/_legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
.form-control {
border-color: $border-color;

@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075)); // Redeclare so transitions work
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); // Redeclare so transitions work
&:focus {
border-color: darken($border-color, 10%);
$shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px lighten($border-color, 20%);
$shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten($border-color, 20%);

@include box-shadow($shadow);
}
Expand Down Expand Up @@ -133,18 +133,18 @@ $popover-title-bg: darken($popover-bg, 3%) !default;
}

.form-group {
margin-bottom: 0.5rem;
margin-bottom: .5rem;
}

.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 0.125rem;
margin-left: .125rem;
vertical-align: middle;
border-top: 0.25rem dashed $gray-700;
border-right: 0.25rem solid transparent;
border-left: 0.25rem solid transparent;
border-top: .25rem dashed $gray-700;
border-right: .25rem solid transparent;
border-left: .25rem solid transparent;
}

.text-right {
Expand Down Expand Up @@ -175,33 +175,19 @@ label {
}

.#{$state} {
/* stylelint-disable custom-property-empty-line-before */
// todo: check why 'grunt formatsass' task is adding new empty lines
$color: color-contrast(opaque($body-bg, $background));

$hover-bg: mix($color, $background, percentage($table-hover-bg-factor));

$striped-bg: mix($color, $background, percentage($table-striped-bg-factor));

$active-bg: mix($color, $background, percentage($table-active-bg-factor));

--bs-table-bg: #{$background};

--bs-table-striped-bg: #{$striped-bg};

--bs-table-striped-color: #{color-contrast($striped-bg)};

--bs-table-active-bg: #{$active-bg};

--bs-table-active-color: #{color-contrast($active-bg)};

--bs-table-hover-bg: #{$hover-bg};

--bs-table-hover-color: #{color-contrast($hover-bg)};

color: $color;
border-color: mix($color, $background, percentage($table-border-factor));
/* stylelint-enable custom-property-empty-line-before */
}
}

Expand Down Expand Up @@ -243,12 +229,11 @@ label {

&-heading {
color: $gray-700;
padding: 0.625rem 1rem;
padding: .625rem 1rem;
}

&-title {
@extend .card-title !optional;

margin-top: 0;
margin-bottom: 0;
}
Expand All @@ -267,18 +252,18 @@ label {
}

.page-header {
padding: 0.625rem 1rem;
padding: .625rem 1rem;
margin: 2rem 0 1rem;
border-bottom: 1px solid $gray-700;
}

code {
margin: 0.25rem 0.5rem;
margin: .25rem .5rem;
}

.help-block {
display: block;
margin-top: 0.5rem;
margin-top: .5rem;
margin-bottom: 1rem;
color: $gray-700;
}
Expand All @@ -287,7 +272,7 @@ code {
> .btn,
> .btn-group,
> .input-group {
margin-left: 0.4rem;
margin-left: .4rem;
float: left;
}

Expand All @@ -314,5 +299,5 @@ code {
}

.modal-backdrop.in {
opacity: 0.5;
opacity: .5;
}
Loading

0 comments on commit ba6a5c7

Please sign in to comment.