Browse Source

fix new eslint errors since v7.10.0 (#3064)

REJack 4 years ago
parent
commit
88b30801f3

+ 1 - 1
build/scss/_cards.scss

@@ -91,7 +91,7 @@
 
   &.card-tabs {
     &:not(.card-outline) {
-      & > .card-header {
+      > .card-header {
         border-bottom: 0;
 
         .nav-item {

+ 2 - 2
build/scss/_dropdown.scss

@@ -57,14 +57,14 @@
 .dropdown-submenu {
   position: relative;
 
-  & > a::after {
+  > a::after {
     @include caret-right ();
     float: right;
     margin-left: .5rem;
     margin-top: .5rem;
   }
 
-  & > .dropdown-menu {
+  > .dropdown-menu {
     left: 100%;
     margin-left: 0;
     margin-top: 0;

+ 7 - 7
build/scss/_layout.scss

@@ -15,7 +15,7 @@ body,
 .wrapper {
   position: relative;
 
-  & .content-wrapper {
+  .content-wrapper {
     min-height: calc(100vh - #{$main-header-height} - #{$main-footer-height});
   }
 
@@ -28,7 +28,7 @@ body,
       max-width: $boxed-layout-max-width;
     }
 
-    & .main-sidebar {
+    .main-sidebar {
       left: inherit;
     }
   }
@@ -407,14 +407,14 @@ body,
       }
     }
 
-    & .main-sidebar {
+    .main-sidebar {
       bottom: inherit;
       height: inherit;
     }
 
-    & .content-wrapper,
-    & .main-header,
-    & .main-footer {
+    .content-wrapper,
+    .main-header,
+    .main-footer {
       margin-left: 0;
     }
   }
@@ -632,7 +632,7 @@ body:not(.sidebar-mini-md) {
 
   .breadcrumb-item {
     &.active,
-    & + .breadcrumb-item::before {
+    + .breadcrumb-item::before {
       color: $gray-500;
     }
   }

+ 3 - 3
build/scss/_main-header.scss

@@ -75,7 +75,7 @@
 .form-control-navbar {
   border-right-width: 0;
 
-  & + .input-group-append {
+  + .input-group-append {
     margin-left: 0;
   }
 }
@@ -103,7 +103,7 @@
 
     &:focus {
       &,
-      & + .input-group-append .btn-navbar {
+      + .input-group-append .btn-navbar {
         background-color: $main-header-dark-form-control-focused-bg;
         border: $main-header-dark-form-control-focused-border !important;
         color: $main-header-dark-form-control-focused-color;
@@ -130,7 +130,7 @@
 
     &:focus {
       &,
-      & + .input-group-append .btn-navbar {
+      + .input-group-append .btn-navbar {
         background-color: $main-header-light-form-control-focused-bg;
         border: $main-header-light-form-control-focused-border !important;
         color: $main-header-light-form-control-focused-color;

+ 1 - 1
build/scss/_main-sidebar.scss

@@ -385,7 +385,7 @@
     // Hover and active states
     &.menu-open > .nav-link,
     &:hover > .nav-link,
-    & > .nav-link:focus  {
+    > .nav-link:focus  {
       background-color: $sidebar-dark-hover-bg;
       color: $sidebar-dark-hover-color;
     }

+ 6 - 6
build/scss/mixins/_custom-forms.scss

@@ -5,31 +5,31 @@
 // Custom Switch Variant
 @mixin custom-switch-variant($name, $color) {
   &.custom-switch-off-#{$name} {
-    & .custom-control-input ~ .custom-control-label::before {
+    .custom-control-input ~ .custom-control-label::before {
       background-color: #{$color};
       border-color: darken($color, 20%);
     }
 
-    & .custom-control-input:focus ~ .custom-control-label::before {
+    .custom-control-input:focus ~ .custom-control-label::before {
       box-shadow: 0 0 0 1px $body-bg, 0 0 0 2px rgba($color, .25);
     }
 
-    & .custom-control-input ~ .custom-control-label::after {
+    .custom-control-input ~ .custom-control-label::after {
       background-color: darken($color, 25%);
     }
   }
 
   &.custom-switch-on-#{$name} {
-    & .custom-control-input:checked ~ .custom-control-label::before {
+    .custom-control-input:checked ~ .custom-control-label::before {
       background-color: #{$color};
       border-color: darken($color, 20%);
     }
 
-    & .custom-control-input:checked:focus ~ .custom-control-label::before {
+    .custom-control-input:checked:focus ~ .custom-control-label::before {
       box-shadow: 0 0 0 1px $body-bg, 0 0 0 2px rgba($color, .25);
     }
 
-    & .custom-control-input:checked ~ .custom-control-label::after {
+    .custom-control-input:checked ~ .custom-control-label::after {
       background-color: lighten($color, 30%);
     }
   }

+ 2 - 2
build/scss/mixins/_sidebar.scss

@@ -5,14 +5,14 @@
 // Sidebar Color
 @mixin sidebar-color($color) {
   .nav-sidebar > .nav-item {
-    & > .nav-link.active {
+    > .nav-link.active {
       background-color: $color;
       color: color-yiq($color);
     }
   }
 
   .nav-sidebar.nav-legacy > .nav-item {
-    & > .nav-link.active {
+    > .nav-link.active {
       border-color: $color;
     }
   }

+ 5 - 5
build/scss/pages/_login_and_register.scss

@@ -52,8 +52,8 @@
       &:focus {
         box-shadow: none;
 
-        & ~ .input-group-prepend .input-group-text,
-        & ~ .input-group-append .input-group-text {
+        ~ .input-group-prepend .input-group-text,
+        ~ .input-group-append .input-group-text {
           border-color: $input-focus-border-color;
         }
       }
@@ -63,8 +63,8 @@
           box-shadow: none;
         }
 
-        & ~ .input-group-prepend .input-group-text,
-        & ~ .input-group-append .input-group-text {
+        ~ .input-group-prepend .input-group-text,
+        ~ .input-group-append .input-group-text {
           border-color: $success;
         }
       }
@@ -74,7 +74,7 @@
           box-shadow: none;
         }
 
-        & ~ .input-group-append .input-group-text {
+        ~ .input-group-append .input-group-text {
           border-color: $danger;
         }
       }