ソースを参照

HUE-9090 [frontend] Bump less and less linter version and fix less linting issues

Johan Ahlen 6 年 前
コミット
34d1c2c3b4

ファイルの差分が大きいため隠しています
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


ファイルの差分が大きいため隠しています
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 1 - 0
desktop/core/src/desktop/static/desktop/less/components/hue-app-switcher.less

@@ -57,6 +57,7 @@
     box-shadow: -2px 2px 4px 0 rgba(27, 35, 41, 0.2);
     box-shadow: 0 0 16px rgba(0, 0, 0, 0.28);
     opacity: 1;
+
     .hue-app-switcher-logo {
       display: block;
     }

+ 0 - 5
desktop/core/src/desktop/static/desktop/less/components/hue-qq-upload.less

@@ -48,10 +48,8 @@
   filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffffffff', GradientType=0);
   border-color: @cui-white @cui-white @cui-gray-300;
   border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-  *background-color: @cui-white;
 
   /* Darken IE7 buttons by default so they stand out more given they won't have borders */
-  filter: progid:dximagetransform.microsoft.gradient(enabled = false);
   border: 1px solid @cui-gray-400;
   *border: 0;
   -webkit-border-radius: 4px;
@@ -141,9 +139,6 @@
   margin-right: 7px;
 }
 
-.qq-upload-file {
-}
-
 .qq-upload-spinner {
   display: inline-block;
   background: url("/static/desktop/ext/js/loading.gif");

+ 0 - 1
desktop/core/src/desktop/static/desktop/less/components/hue-query-builder.less

@@ -44,7 +44,6 @@
 
   .queryBuilderRow {
     border-collapse: separate;
-    border-spacing-bottom: 10px;
     cursor: default;
   }
 

+ 1 - 6
desktop/core/src/desktop/static/desktop/less/components/hue-selectize.less

@@ -232,7 +232,6 @@
   display: -moz-inline-stack;
   display: inline-block;
   zoom: 1;
-  *display: inline;
 }
 
 .selectize-control.multi .selectize-input > div {
@@ -305,7 +304,7 @@
 
 .selectize-dropdown {
   position: absolute;
-  z-index: 10;
+  z-index: 10000 !important;
   border: 1px solid @cui-gray-400;
   background: @cui-white;
   margin: -1px 0 0 0;
@@ -478,10 +477,6 @@
   }
 }
 
-.selectize-dropdown {
-  z-index: 10000 !important;
-}
-
 .selectize-control.plugin-clear_button .clearAll {
   font-size: 17px;
   position: absolute;

+ 7 - 20
desktop/core/src/desktop/static/desktop/less/components/hue-shepherd.less

@@ -42,17 +42,22 @@
 }
 
 .shepherd-element.shepherd-theme-hue {
-  max-width: 100%;
   max-height: 100%;
+  border-radius: 0;
+  z-index: 9999;
+  max-width: 24em;
+  font-size: 1em;
 }
 
 .shepherd-element.shepherd-theme-hue .shepherd-content {
+  .hue-box-shadow-bottom;
+
   border-radius: 4px;
+  padding: 0;
   position: relative;
   font-family: inherit;
   background: @cui-gray-900;
   color: @cui-gray-200;
-  padding: 1em;
   font-size: 1.1em;
   line-height: 1.5em;
 }
@@ -241,13 +246,6 @@
   border-right-color: @cui-gray-900;
 }
 
-.shepherd-element.shepherd-theme-hue {
-  border-radius: 0;
-  z-index: 9999;
-  max-width: 24em;
-  font-size: 1em;
-}
-
 .shepherd-element.shepherd-theme-hue.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content::before,
 .shepherd-element.shepherd-theme-hue.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content::before,
 .shepherd-element.shepherd-theme-hue.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content::before {
@@ -268,13 +266,6 @@
   float: left;
 }
 
-.shepherd-element.shepherd-theme-hue .shepherd-content {
-  .hue-box-shadow-bottom;
-
-  border-radius: 4px;
-  padding: 0;
-}
-
 .shepherd-element.shepherd-theme-hue .shepherd-content * {
   font-size: inherit;
 }
@@ -349,8 +340,6 @@
   vertical-align: middle;
   *vertical-align: auto;
   *zoom: 1;
-  *display: inline;
-  border-radius: 0;
   cursor: pointer;
   border: 0;
   margin: 0 0.5em 0 0;
@@ -378,8 +367,6 @@
   vertical-align: middle;
   *vertical-align: auto;
   *zoom: 1;
-  *display: inline;
-  border-radius: 0;
   cursor: pointer;
   border: 0;
   margin: 0 0.5em 0 0;

+ 19 - 15
desktop/core/src/desktop/static/desktop/less/components/hue-sidebar.less

@@ -72,8 +72,8 @@
     cursor: pointer;
     text-decoration: none;
 
-    &[target='_blank']:after,
-    &[target='_blank']:before {
+    &[target='_blank']::after,
+    &[target='_blank']::before {
       content: none !important;
     }
   }
@@ -90,10 +90,19 @@
     margin-bottom: 8px;
     padding: 0 0 0 24px;
     background-color: @header-bg;
+
     &.hue-sidebar-custom-logo {
       background-color: @cui-white;
       border-top: 2px solid @hue-primary-color-dark;
-      height: calc(@sidebar-header-height - 3px);
+      height: calc(@sidebar-header-height - 3px); /* stylelint-disable-line */
+
+      .hue-sidebar-logo {
+        margin-left: 32px;
+      }
+
+      .hue-sidebar-logo svg {
+        width: 128px;
+      }
     }
 
     .hue-app-switcher-trigger {
@@ -148,15 +157,6 @@
       height: 32px;
       width: 100px;
     }
-
-    &.hue-sidebar-custom-logo {
-      .hue-sidebar-logo {
-        margin-left: 32px;
-      }
-      .hue-sidebar-logo svg {
-        width: 128px;
-      }
-    }
   }
 
   .hue-sidebar-body {
@@ -220,7 +220,8 @@
     justify-content: center;
     font-size: @sidebar-icon-height;
 
-    i, svg {
+    i,
+    svg {
       font-size: @sidebar-icon-height;
       height: @sidebar-icon-height; // nv d3 conflict
     }
@@ -281,6 +282,7 @@
 
       &.hue-sidebar-custom-logo {
         padding: 0;
+
         .hue-sidebar-logo {
           width: 56px;
           margin-left: -6px;
@@ -351,7 +353,8 @@
       font-size: @sidebar-collapsed-icon-height;
       height: @sidebar-collapsed-icon-height;
 
-      i, svg {
+      i,
+      svg {
         font-size: @sidebar-collapsed-icon-height;
         height: @sidebar-collapsed-icon-height;
       }
@@ -370,6 +373,7 @@
 
   &:not(.collapsed) .hue-sidebar-header {
     background-color: @header-bg-open !important;
+
     &.hue-sidebar-custom-logo {
       background-color: @cui-white !important;
     }
@@ -484,4 +488,4 @@
       }
     }
   }
-}
+}

+ 4 - 6
desktop/core/src/desktop/static/desktop/less/hue-assist.less

@@ -311,13 +311,11 @@
 
     &:hover {
       background-color: @cui-gray-050;
-    }
-  }
 
-  .assist-column:hover {
-    .assist-actions,
-    .assist-file-actions {
-      background-color: @cui-gray-050;
+      .assist-actions,
+      .assist-file-actions {
+        background-color: @cui-gray-050;
+      }
     }
   }
 

+ 3 - 3
desktop/core/src/desktop/static/desktop/less/hue-mixins.less

@@ -177,19 +177,19 @@
 .flex-box-flex(@flex) {
   -webkit-box-flex: @flex;
   -moz-box-flex: @flex;
-  box-flex: @flex;
+  box-flex: @flex; /* stylelint-disable-line */
 }
 
 .flex-box-align(@align) {
   -webkit-box-align: @align;
   -moz-box-align: @align;
-  box-align: @align;
+  box-align: @align; /* stylelint-disable-line */
 }
 
 .flex-box-pack(@pack) {
   -webkit-box-pack: @pack;
   -moz-box-pack: @pack;
-  box-pack: @pack;
+  box-pack: @pack; /* stylelint-disable-line */
 }
 
 .flex-shrink(@shrink) {

+ 1 - 1
desktop/core/src/desktop/static/desktop/less/hue-multi-cluster-icons.less

@@ -24,7 +24,7 @@
 
 &.altus-icon {
   display: inline-block;
-  font: normal normal normal 16px/1 altus;
+  font: normal normal normal 16px/1 altus; /* stylelint-disable-line */
   font-size: inherit;
   font-style: normal;
   font-weight: normal;

+ 4 - 11
desktop/core/src/desktop/static/desktop/less/hue3-extra.less

@@ -33,7 +33,7 @@
 
 .subnav {
   background-color: @cui-gray-100;
-  background-image: -moz-linear-gradient(center top, @cui-gray-050 0, @cui-gray-100 100%);
+  background-image: -moz-linear-gradient(center top, @cui-gray-050 0, @cui-gray-100 100%); /* stylelint-disable-line */
   background-repeat: repeat-x;
   border: 1px solid @cui-gray-200;
   border-radius: 4px;
@@ -81,9 +81,9 @@
 .subnav .nav > li:first-child > a,
 .subnav .nav > li:first-child > a:hover {
   border-left: 0 none;
-  border-radius: 4px 0 0 4px;
-  -webkit-border-radius: 4px 0 0 4px;
-  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
   padding-left: 12px;
 }
 
@@ -116,13 +116,6 @@
   padding: 0 1px;
 }
 
-.subnav .nav > li:first-child > a,
-.subnav .nav > li:first-child > a:hover {
-  border-radius: 0;
-  -webkit-border-radius: 0;
-  -moz-border-radius: 0;
-}
-
 .hue-title-bar {
   position: fixed;
   right: 0;

+ 2 - 2
desktop/core/src/desktop/static/desktop/less/hue4.less

@@ -32,6 +32,7 @@
 
 .main-page {
   .flex(1 1 auto);
+
   position: relative;
   .display-flex;
   .flex-direction(column);
@@ -457,11 +458,10 @@
   background-color: @cui-gray-050;
 
   .navbar-inner {
-    background-color: transparent !important;
+    background: none;
     margin: 0 !important;
     padding-top: 0;
     padding-bottom: 0;
-    background: none;
     min-height: 49px;
   }
 }

ファイルの差分が大きいため隠しています
+ 468 - 188
package-lock.json


+ 4 - 4
package.json

@@ -41,7 +41,7 @@
     "knockout-switch-case": "2.1.0",
     "knockout.mapping": "2.4.3",
     "knockout.validation": "2.0.3",
-    "less": "3.9.0",
+    "less": "^3.10.3",
     "libxmljs": "^0.19.5",
     "localforage": "1.7.3",
     "lodash": "4.17.13",
@@ -86,12 +86,12 @@
     "karma-mocha-reporter": "^2.2.5",
     "karma-spec-reporter": "0.0.32",
     "karma-webpack": "4.0.0-rc.6",
-    "lesshint": "6.3.2",
+    "lesshint": "^6.3.7",
     "load-grunt-tasks": "4.0.0",
     "markdown": "0.5.0",
     "prettier": "1.16.1",
-    "stylelint": "^9.10.1",
-    "stylelint-config-standard": "^18.2.0",
+    "stylelint": "^12.0.0",
+    "stylelint-config-standard": "^19.0.0",
     "webpack": "4.41.2",
     "webpack-bundle-analyzer": "^3.6.0",
     "webpack-bundle-tracker": "^0.4.3",

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません