From e59c2c1188f4660805d806bf27c5ef192b05da3e Mon Sep 17 00:00:00 2001 From: Andrea Stagi Date: Thu, 21 Nov 2024 10:39:35 +0000 Subject: [PATCH] chore: linting --- docs/assets/src/scss/_component-examples.scss | 6 +++++- src/js/plugins/header-sticky.js | 1 - src/js/plugins/util/observer.js | 4 ++-- src/js/version.js | 2 +- src/scss/custom/_back-to-top.scss | 12 ++++++++++-- src/scss/custom/_badge.scss | 6 +++++- src/scss/custom/_buttons.scss | 4 +++- src/scss/custom/_card.scss | 4 +++- src/scss/custom/_form-datepicker.scss | 1 - src/scss/custom/_form-input-file.scss | 1 - src/scss/custom/_form-input-upload.scss | 4 +++- src/scss/custom/_form-toggles.scss | 5 ++++- src/scss/custom/_navscroll.scss | 8 ++++++-- src/scss/custom/mixins/_buttons.scss | 16 ++++++++++++---- 14 files changed, 54 insertions(+), 20 deletions(-) diff --git a/docs/assets/src/scss/_component-examples.scss b/docs/assets/src/scss/_component-examples.scss index 2635140bad..067bb32a83 100755 --- a/docs/assets/src/scss/_component-examples.scss +++ b/docs/assets/src/scss/_component-examples.scss @@ -4,7 +4,11 @@ background-image: linear-gradient(45deg, $neutral-1-a2 25%, transparent 25%), linear-gradient(-45deg, $neutral-1-a2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, $neutral-1-a2 75%), linear-gradient(-45deg, transparent 75%, $neutral-1-a2 75%); background-size: 20px 20px; - background-position: 0 0, 0 10px, 10px -10px, -10px 0px; + background-position: + 0 0, + 0 10px, + 10px -10px, + -10px 0px; } .row { diff --git a/src/js/plugins/header-sticky.js b/src/js/plugins/header-sticky.js index cc45542cdd..eebeccd766 100644 --- a/src/js/plugins/header-sticky.js +++ b/src/js/plugins/header-sticky.js @@ -17,7 +17,6 @@ const SELECTOR_SEARCH_WRAPPER = '.it-search-wrapper' const SELECTOR_USER_WRAPPER = '.it-user-wrapper' const SELECTOR_CLONED = `.${CLASS_NAME_CLONED_HEADER}` -// eslint-disable-next-line no-undef const dataSet = new Map() class HeaderSticky { diff --git a/src/js/plugins/util/observer.js b/src/js/plugins/util/observer.js index 21a01c4918..4d9b2c7115 100644 --- a/src/js/plugins/util/observer.js +++ b/src/js/plugins/util/observer.js @@ -98,8 +98,8 @@ class ContentObserver { actionRemove && typeof this.contentRemovedCallback === 'function' ? this.contentRemovedCallback : typeof this.contentAddedCallback === 'function' - ? this.contentAddedCallback - : null + ? this.contentAddedCallback + : null if (foundNodes && callback) { foundNodes.forEach((node) => callback(node)) } diff --git a/src/js/version.js b/src/js/version.js index add11da80d..e77af3547c 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,5 +1,5 @@ // bootstrap italia version variable // useful to check for the current version -// eslint-disable-next-line no-unused-vars + const BOOTSTRAP_ITALIA_VERSION = '2.11.2' export default BOOTSTRAP_ITALIA_VERSION diff --git a/src/scss/custom/_back-to-top.scss b/src/scss/custom/_back-to-top.scss index 7f8d65e13f..d1139ee689 100644 --- a/src/scss/custom/_back-to-top.scss +++ b/src/scss/custom/_back-to-top.scss @@ -12,7 +12,11 @@ visibility: hidden; opacity: 0; text-align: center; - transition: $transition-base, transform 0.25s cubic-bezier(0.75, -0.5, 0, 1.75), visibility 0.3s linear, opacity 0.3s ease-in-out; + transition: + $transition-base, + transform 0.25s cubic-bezier(0.75, -0.5, 0, 1.75), + visibility 0.3s linear, + opacity 0.3s ease-in-out; z-index: 1; transform: scale(0.7); transform-origin: center center; @@ -20,7 +24,11 @@ &.back-to-top-show { visibility: visible; opacity: 1; - transition: $transition-base, transform 0.05s ease-out, visibility 0s linear, opacity 0.1s ease-in-out; + transition: + $transition-base, + transform 0.05s ease-out, + visibility 0s linear, + opacity 0.1s ease-in-out; transform: scale(1); } &:hover { diff --git a/src/scss/custom/_badge.scss b/src/scss/custom/_badge.scss index 7e71fb9e16..8c8218d4b3 100644 --- a/src/scss/custom/_badge.scss +++ b/src/scss/custom/_badge.scss @@ -1,7 +1,11 @@ .badge { --bs-badge-font-size: 0.875em; --bs-badge-font-weight: #{$font-weight-semibold}; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: + color 0.15s ease-in-out, + background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; @each $color, $value in $theme-colors { &.badge-outline-#{$color} { background-color: transparent !important; diff --git a/src/scss/custom/_buttons.scss b/src/scss/custom/_buttons.scss index 50f052c7ac..5878a4e639 100644 --- a/src/scss/custom/_buttons.scss +++ b/src/scss/custom/_buttons.scss @@ -226,7 +226,9 @@ } &:focus, &.focus { - box-shadow: inset 0 0 0 2px $white, 0 0 0 $btn-focus-width rgba($white, 0.5); + box-shadow: + inset 0 0 0 2px $white, + 0 0 0 $btn-focus-width rgba($white, 0.5); } &:not(:disabled):not(.disabled).active, &:not(:disabled):not(.disabled):active, diff --git a/src/scss/custom/_card.scss b/src/scss/custom/_card.scss index 656ae5154f..bdedfb96b1 100644 --- a/src/scss/custom/_card.scss +++ b/src/scss/custom/_card.scss @@ -354,7 +354,9 @@ width: 80px; border-radius: 4px; background-color: $white; - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1), 0 4px 8px 0 rgba(0, 0, 0, 0.1); + box-shadow: + 0 1px 4px 0 rgba(0, 0, 0, 0.1), + 0 4px 8px 0 rgba(0, 0, 0, 0.1); position: absolute; right: 32px; top: 10%; diff --git a/src/scss/custom/_form-datepicker.scss b/src/scss/custom/_form-datepicker.scss index f9cc342f85..0506ee542e 100644 --- a/src/scss/custom/_form-datepicker.scss +++ b/src/scss/custom/_form-datepicker.scss @@ -186,7 +186,6 @@ a.datepicker-button { .datepicker-month:focus, .datepicker-month:hover { background-color: #eee; - border-color: #999; border: none; margin: 0; padding: 0; diff --git a/src/scss/custom/_form-input-file.scss b/src/scss/custom/_form-input-file.scss index 5d4c7bf8ef..c32443614a 100644 --- a/src/scss/custom/_form-input-file.scss +++ b/src/scss/custom/_form-input-file.scss @@ -27,7 +27,6 @@ input[type='file'] + label { z-index: 5; &::before { background-color: $white; - border-color: $primary; bottom: -1px; color: $primary; content: 'Sfoglia'; diff --git a/src/scss/custom/_form-input-upload.scss b/src/scss/custom/_form-input-upload.scss index ae1587f70c..8373f19f79 100644 --- a/src/scss/custom/_form-input-upload.scss +++ b/src/scss/custom/_form-input-upload.scss @@ -478,7 +478,9 @@ align-items: center; opacity: 0; transform: scale(0.6); - transition: opacity 0.2s, transform 0.5s cubic-bezier(0.75, -0.5, 0, 1.75); + transition: + opacity 0.2s, + transform 0.5s cubic-bezier(0.75, -0.5, 0, 1.75); svg { fill: $white; diff --git a/src/scss/custom/_form-toggles.scss b/src/scss/custom/_form-toggles.scss index f091236211..45d88206a5 100644 --- a/src/scss/custom/_form-toggles.scss +++ b/src/scss/custom/_form-toggles.scss @@ -48,7 +48,10 @@ border-radius: 50%; top: -5px; left: -3px; - transition: left 0.3s ease, background 0.1s ease, transform 0.1s ease; + transition: + left 0.3s ease, + background 0.1s ease, + transform 0.1s ease; } &:before { diff --git a/src/scss/custom/_navscroll.scss b/src/scss/custom/_navscroll.scss index d9a85a1efd..90f3e6a330 100644 --- a/src/scss/custom/_navscroll.scss +++ b/src/scss/custom/_navscroll.scss @@ -16,7 +16,9 @@ z-index: 10; visibility: hidden; opacity: 0; - transition: opacity 0.3s 0s, visibility 0s 0.3s; + transition: + opacity 0.3s 0s, + visibility 0s 0.3s; i { transform: scale(0.8); transform-origin: center; @@ -24,7 +26,9 @@ margin-right: $v-gap; } &.show { - transition: opacity 0.3s 0s, visibility 0s 0s; + transition: + opacity 0.3s 0s, + visibility 0s 0s; visibility: visible; opacity: 1; } diff --git a/src/scss/custom/mixins/_buttons.scss b/src/scss/custom/mixins/_buttons.scss index 0196c5505e..a46f477285 100644 --- a/src/scss/custom/mixins/_buttons.scss +++ b/src/scss/custom/mixins/_buttons.scss @@ -15,7 +15,9 @@ &.focus { // Avoid using mixin so we can pass custom focus shadow properly @if $enable-shadows { - box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba($border, 0.5); + box-shadow: + $btn-box-shadow, + 0 0 0 $btn-focus-width rgba($border, 0.5); } @else { box-shadow: 0 0 0 $btn-focus-width rgba($border, 0.5); } @@ -48,7 +50,9 @@ &:focus { // Avoid using mixin so we can pass custom focus shadow properly @if $enable-shadows { - box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($border, 0.5); + box-shadow: + $btn-active-box-shadow, + 0 0 0 $btn-focus-width rgba($border, 0.5); } @else { box-shadow: 0 0 0 $btn-focus-width rgba($border, 0.5); } @@ -69,7 +73,9 @@ &:focus, &.focus { - box-shadow: inset 0 0 0 1px $active-border, 0 0 0 $btn-focus-width rgba($color, 0.5); + box-shadow: + inset 0 0 0 1px $active-border, + 0 0 0 $btn-focus-width rgba($color, 0.5); } &.disabled, @@ -89,7 +95,9 @@ &:focus { // Avoid using mixin so we can pass custom focus shadow properly @if $enable-shadows and $btn-active-box-shadow != none { - box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, 0.5); + box-shadow: + $btn-active-box-shadow, + 0 0 0 $btn-focus-width rgba($color, 0.5); } @else { box-shadow: 0 0 0 $btn-focus-width rgba($color, 0.5); }