Sfoglia il codice sorgente

HUE-9090 [frontend] Adjust stylelint rules to be less agressive

Johan Ahlen 6 anni fa
parent
commit
698f13afa0

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

@@ -76,4 +76,3 @@
     margin-top: 1em;
   }
 }
-

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

@@ -521,7 +521,6 @@ div.box {
   padding-left: 14px !important;
 }
 
-
 /*
  * jHueTableExtender
  */

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

@@ -111,4 +111,3 @@
     padding: 11px 16px;
   }
 }
-

+ 0 - 4
desktop/core/src/desktop/static/desktop/less/cui/colors.less

@@ -25,7 +25,6 @@
   ~"flume-color", ~"impala-color", ~"sqoop-color", ~"solr-color", ~"spark-color", ~"pig-color", ~"yarn-color",
   ~"s3-color", ~"api-color";
 
-
 // Base colors ----------------------------------------------
 
 @cui-black:                       #000000;
@@ -49,7 +48,6 @@
 @cui-white:                       #FFFFFF;
 @cui-yellow:                      @cui-yellow-500;
 
-
 // All standard colors --------------------------------------
 
 @cui-gray-040:                    #fafbfc;
@@ -231,8 +229,6 @@
 @cui-s3-color:                    @cui-orange-500;
 @cui-api-color:                   @cui-gray-700;
 
-
-
 /*
   -- Color Class Generator -------------------------------------
   Can be used to generate color classes for all shades and tints.

+ 0 - 33
desktop/core/src/desktop/static/desktop/less/cui/variables.less

@@ -30,7 +30,6 @@
 // The default foreground color when used on an inverse element.
 @cui-default-inverse-color: @cui-default-bg-color;
 
-
 //== Colors
 //
 //## Gray and brand colors for use across Bootstrap.
@@ -64,7 +63,6 @@
 //## Link hover decoration.
 @link-hover-decoration: underline;
 
-
 //== Typography
 //
 //## Font, line-height, and color for body text, headings, and more.
@@ -97,7 +95,6 @@
 @headings-line-height:    1.1;
 @headings-color:          @text-color;
 
-
 //== Iconography
 //
 //## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
@@ -143,7 +140,6 @@
 //## Carets increase slightly in size for larger components.
 @caret-width-large:         5px;
 
-
 //== Tables
 //
 //## Customizes the `.table` component with basic values, each used across all table variations.
@@ -164,7 +160,6 @@
 //## Border color for table and cell borders.
 @table-border-color:            @cui-default-border-color;
 
-
 //== Buttons
 //
 //## For each of Bootstrap's buttons, define text, background and border color.
@@ -202,7 +197,6 @@
 @btn-border-radius-large:        @border-radius-base;
 @btn-border-radius-small:        @border-radius-base;
 
-
 //== Forms
 //
 //##
@@ -253,7 +247,6 @@
 //## Disabled cursor for form controls and buttons.
 @cursor-disabled:                not-allowed;
 
-
 //== Dropdowns
 //
 //## Dropdown menu container and contents.
@@ -288,7 +281,6 @@
 //## Deprecated `@dropdown-caret-color` as of v3.1.0
 @dropdown-caret-color:           #000;
 
-
 //-- Z-index master list
 //
 // Warning: Avoid customizing these values. They're used for a bird's eye view
@@ -304,7 +296,6 @@
 @zindex-modal-background:  1040;
 @zindex-modal:             1050;
 
-
 //== Media queries breakpoints
 //
 //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
@@ -343,7 +334,6 @@
 @screen-sm-max:              (@screen-md-min - 1);
 @screen-md-max:              (@screen-lg-min - 1);
 
-
 //== Grid system
 //
 //## Define your custom responsive grid.
@@ -358,7 +348,6 @@
 //## Point at which the navbar begins collapsing.
 @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
 
-
 //== Container sizes
 //
 //## Define the maximum width of `.container` for different screen sizes.
@@ -378,7 +367,6 @@
 //## For `@screen-lg-min` and up.
 @container-lg:                 @container-large-desktop;
 
-
 //== Navbar
 //
 //##
@@ -414,7 +402,6 @@
 @navbar-default-toggle-icon-bar-bg:        #888;
 @navbar-default-toggle-border-color:       #ddd;
 
-
 //=== Inverted navbar
 // Reset inverted navbar basics
 @navbar-inverse-color:                      @cui-default-inverse-color;
@@ -440,7 +427,6 @@
 @navbar-inverse-toggle-icon-bar-bg:         @cui-default-bg-color;
 @navbar-inverse-toggle-border-color:        #333;
 
-
 //== Navs
 //
 //##
@@ -469,7 +455,6 @@
 @nav-pills-active-link-hover-bg:            @component-active-bg;
 @nav-pills-active-link-hover-color:         @component-active-color;
 
-
 //== Pagination
 //
 //##
@@ -490,7 +475,6 @@
 @pagination-disabled-bg:               @cui-default-bg-color;
 @pagination-disabled-border:           transparent;
 
-
 //== Pager
 //
 //##
@@ -506,7 +490,6 @@
 
 @pager-disabled-color:                 @pagination-disabled-color;
 
-
 //== Jumbotron
 //
 //##
@@ -518,7 +501,6 @@
 @jumbotron-font-size:            ceil((@font-size-base * 1.5));
 @jumbotron-heading-font-size:    ceil((@font-size-base * 4.5));
 
-
 //== Form states and alerts
 //
 //## Define colors for form feedback states and, by default, alerts.
@@ -556,7 +538,6 @@
 //## Tooltip arrow color
 @tooltip-arrow-color:         @tooltip-bg;
 
-
 //== Popovers
 //
 //##
@@ -585,7 +566,6 @@
 //## Popover outer arrow fallback color
 @popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
 
-
 //== Labels
 //
 //##
@@ -608,7 +588,6 @@
 //## Default text color of a linked label
 @label-link-hover-color:      @cui-default-inverse-color;
 
-
 //== Modals
 //
 //##
@@ -641,7 +620,6 @@
 @modal-md:                    600px;
 @modal-sm:                    300px;
 
-
 //== Alerts
 //
 //## Define alert colors, border radius, and padding.
@@ -666,7 +644,6 @@
 @alert-danger-text:           @state-danger-text;
 @alert-danger-border:         @state-danger-border;
 
-
 //== Progress bars
 //
 //##
@@ -689,7 +666,6 @@
 //## Info progress bar color
 @progress-bar-info-bg:        @brand-info;
 
-
 //== List group
 //
 //##
@@ -723,7 +699,6 @@
 @list-group-link-hover-color:   @list-group-link-color;
 @list-group-link-heading-color: #333;
 
-
 //== Panels
 //
 //##
@@ -762,7 +737,6 @@
 @panel-danger-border:         @state-danger-border;
 @panel-danger-heading-bg:     @state-danger-bg;
 
-
 //== Thumbnails
 //
 //##
@@ -781,7 +755,6 @@
 //## Padding around the thumbnail caption
 @thumbnail-caption-padding:   9px;
 
-
 //== Wells
 //
 //##
@@ -789,7 +762,6 @@
 @well-bg: @cui-gray-050;
 @well-border: @cui-default-border-color;
 
-
 //== Badges
 //
 //##
@@ -808,7 +780,6 @@
 @badge-line-height:           1;
 @badge-border-radius:         0;
 
-
 //== Breadcrumbs
 //
 //##
@@ -824,7 +795,6 @@
 //## Textual separator for between breadcrumb elements
 @breadcrumb-separator:          "/";
 
-
 //== Carousel
 //
 //##
@@ -841,7 +811,6 @@
 
 @carousel-caption-color:                      @cui-default-inverse-color;
 
-
 //== Close
 //
 //##
@@ -850,7 +819,6 @@
 @close-color:                 #000;
 @close-text-shadow:           0 1px 0 #fff;
 
-
 //== Code
 //
 //##
@@ -866,7 +834,6 @@
 @pre-border-color:            #ccc;
 @pre-scrollable-max-height:   340px;
 
-
 //== Type
 //
 //##

+ 0 - 1
desktop/core/src/desktop/static/desktop/less/hue3-extra.less

@@ -136,7 +136,6 @@
   border-radius: 0;
 }
 
-
 .search-container {
   .display-flex;
   .flex(1 1 37px);

+ 9 - 1
package.json

@@ -23,6 +23,13 @@
   "engines": {
     "node": ">=0.10.0"
   },
+  "stylelint": {
+    "extends": "stylelint-config-standard",
+    "rules": {
+      "number-leading-zero": null,
+      "no-descending-specificity": null
+    }
+  },
   "dependencies": {
     "regenerator-runtime": "^0.13.3",
     "core-js": "^3.4.2",
@@ -103,7 +110,8 @@
     "dev-workers": "webpack --config webpack.config.workers.js --watch -d",
     "less": "./node_modules/.bin/grunt less",
     "less-dev": "./node_modules/.bin/grunt watch",
-    "less-lint": "stylelint \"desktop/core/src/desktop/static/desktop/less/**/*.less\" --fix",
+    "less-lint": "stylelint \"desktop/core/src/desktop/static/desktop/less/**/*.less\"",
+    "less-lint-fix": "npm run less-lint -- --fix",
     "lint": "eslint desktop/core/src/desktop/js tools/sql-docs tools/jison",
     "lint-debug": "npm run lint -- --debug",
     "lint-fix": "npm run lint -- --fix",