Add lint to CI and fix errors (#853)

Adds lint to CI and fixes errors.
I'm not sure I'm fully proud of all the solutions there.
But there's no lint issues and the lint is being checked as part of the
CI.

---------

Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
This commit is contained in:
Harel M
2023-12-26 23:13:22 +02:00
committed by GitHub
parent a324ddb654
commit a22476cab2
55 changed files with 831 additions and 691 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
@use 'sass:color';
// MAP
.maputnik-map__container {
background: white;
@@ -110,12 +111,12 @@
text-decoration: none;
&:hover {
background-color: lighten($color-midgray, 12);
background-color: color.adjust($color-midgray, $lightness: 12%);
color: $color-white;
}
&:disabled {
background-color: darken($color-midgray, 5);
background-color: color.adjust($color-midgray, $lightness: -5%);
color: $color-midgray;
cursor: not-allowed;
}
+3 -3
View File
@@ -8,7 +8,7 @@
}
.maputnik-filter-editor {
@extend .clearfix;
@extend .clearfix; /* stylelint-disable-line */
color: $color-lowgray;
}
@@ -62,7 +62,7 @@
}
.maputnik-delete-filter {
@extend .maputnik-icon-button;
@extend .maputnik-icon-button; /* stylelint-disable-line */
}
.maputnik-filter-editor-block-action {
@@ -79,7 +79,7 @@
}
.maputnik-radio-as-button {
@extend .maputnik-button;
@extend .maputnik-button; /* stylelint-disable-line */
border: solid 1px transparent;
+8 -7
View File
@@ -1,3 +1,4 @@
@use 'sass:color';
//INPUT
.maputnik-input {
height: 24px;
@@ -10,7 +11,7 @@
padding-right: $margin-2;
border: none;
background-color: $color-gray;
color: lighten($color-lowgray, 12);
color: color.adjust($color-lowgray, $lightness: 12%);
&:invalid {
border: solid 1px #B71C1C;
@@ -19,7 +20,7 @@
}
.maputnik-string {
@extend .maputnik-input;
@extend .maputnik-input; /* stylelint-disable-line */
&--multi {
resize: vertical;
@@ -43,12 +44,12 @@
}
.maputnik-number {
@extend .maputnik-input;
@extend .maputnik-input; /* stylelint-disable-line */
}
//COLOR PICKER
.maputnik-color {
@extend .maputnik-input;
@extend .maputnik-input; /* stylelint-disable-line */
height: 26px;
}
@@ -95,7 +96,7 @@
// SELECT
.maputnik-select {
@extend .maputnik-input;
@extend .maputnik-input; /* stylelint-disable-line */
-moz-appearance: none;
-webkit-appearance: none;
@@ -117,7 +118,7 @@
}
.maputnik-button-selected {
background-color: lighten($color-midgray, 12);
background-color: color.adjust($color-midgray, $lightness: 12%);
color: white;
}
@@ -133,7 +134,7 @@
outline: none;
&-wrapper {
@extend .maputnik-input;
@extend .maputnik-input; /* stylelint-disable-line */
padding-left: 0;
padding-right: 0;
+14 -13
View File
@@ -1,3 +1,4 @@
@use 'sass:color';
// LAYER LIST
.maputnik-layer-list {
height: 100%;
@@ -48,7 +49,7 @@
font-weight: 400;
color: $color-lowgray;
font-size: $font-size-6;
border-bottom-color: lighten($color-black, 0.1);
border-bottom-color: color.adjust($color-black, $lightness: 0.1%);
user-select: none;
list-style: none;
z-index: 2000;
@@ -87,7 +88,7 @@
height: 15px;
svg {
fill: darken($color-lowgray, 20);
fill: color.adjust($color-lowgray, $lightness: -20%);
&:hover {
fill: $color-white;
@@ -101,13 +102,13 @@
.maputnik-layer-list-item:hover,
.maputnik-layer-list-item-selected {
background-color: lighten($color-black, 2);
background-color: color.adjust($color-black, $lightness: 2%);
.maputnik-layer-list-icon-action {
display: block;
svg {
fill: darken($color-lowgray, 0.5);
fill: color.adjust($color-lowgray, $lightness: -0.5%);
}
}
}
@@ -151,7 +152,7 @@
border: solid 1px transparent;
font-size: $font-size-6;
color: $color-lowgray;
background-color: lighten($color-black, 2);
background-color: color.adjust($color-black, $lightness: 2%);
user-select: none;
padding: $margin-2;
@@ -185,7 +186,7 @@
.maputnik-layer-editor-group {
font-weight: bold;
font-size: $font-size-5;
background-color: lighten($color-black, 2);
background-color: color.adjust($color-black, $lightness: 2%);
color: $color-white;
cursor: pointer;
user-select: none;
@@ -232,7 +233,7 @@
// PROPERTY
.maputnik-default-property {
.maputnik-input-block-label {
color: darken($color-lowgray, 20%);
color: color.adjust($color-lowgray, $lightness: -20%);
}
.maputnik-string,
@@ -240,8 +241,8 @@
.maputnik-color,
.maputnik-select,
.maputnik-checkbox-wrapper {
background-color: darken($color-gray, 2%);
color: darken($color-lowgray, 20%);
background-color: color.adjust($color-gray, $lightness: -2%);
color: color.adjust($color-lowgray, $lightness: -20%);
}
.maputnik-make-zoom-function svg {
@@ -249,17 +250,17 @@
}
.maputnik-multibutton .maputnik-button {
background-color: darken($color-midgray, 10%);
color: darken($color-lowgray, 20%);
background-color: color.adjust($color-midgray, $lightness: -10%);
color: color.adjust($color-lowgray, $lightness: -20%);
&:hover {
background-color: lighten($color-midgray, 12);
background-color: color.adjust($color-midgray, $lightness: 12%);
color: $color-white;
}
}
.maputnik-multibutton .maputnik-button-selected {
background-color: darken($color-midgray, 2%);
background-color: color.adjust($color-midgray, $lightness: -2%);
color: $color-lowgray;
}
}
+6 -6
View File
@@ -72,12 +72,12 @@
}
.maputnik-modal-header-space {
@extend .maputnik-space;
@extend .maputnik-space; /* stylelint-disable-line */
}
//OPEN MODAL
.maputnik-upload-button {
@extend .maputnik-big-button;
@extend .maputnik-big-button; /* stylelint-disable-line */
}
.maputnik-style-gallery-container {
@@ -139,12 +139,12 @@
}
.maputnik-add-layer {
@extend .clearfix;
@extend .clearfix; /* stylelint-disable-line */
}
//ADD MODAL
.maputnik-add-layer-button {
@extend .maputnik-big-button;
@extend .maputnik-big-button; /* stylelint-disable-line */
margin-right: $margin-3;
float: right;
@@ -221,7 +221,7 @@
}
.maputnik-add-source {
@extend .clearfix;
@extend .clearfix; /* stylelint-disable-line */
.maputnik-input-block-label {
width: 30%;
@@ -233,7 +233,7 @@
}
.maputnik-add-source-button {
@extend .maputnik-big-button;
@extend .maputnik-big-button; /* stylelint-disable-line */
display: inline-block;
margin-top: 0;
+4 -3
View File
@@ -1,3 +1,4 @@
@use 'sass:color';
// TOOLBAR
.maputnik-toolbar {
position: fixed;
@@ -75,7 +76,7 @@
}
&:hover .maputnik-toolbar-link-wrapper {
background-color: lighten($color-midgray, 12);
background-color: color.adjust($color-midgray, $lightness: 12%);
color: $color-white;
}
}
@@ -93,13 +94,13 @@
.maputnik-toolbar-action {
background: inherit;
border-width: 0;
@extend .maputnik-toolbar-link;
@extend .maputnik-toolbar-link; /* stylelint-disable-line */
}
.maputnik-toolbar-select {
background: inherit;
border-width: 0;
@extend .maputnik-toolbar-link;
@extend .maputnik-toolbar-link; /* stylelint-disable-line */
select {
margin-left: 6px;
+4 -4
View File
@@ -5,12 +5,12 @@
vertical-align: middle;
padding: 0 $margin-2 0 0;
@extend .maputnik-icon-button;
@extend .maputnik-icon-button; /* stylelint-disable-line */
}
// ZOOM PROPERTY
.maputnik-zoom-spec-property {
@extend .clearfix;
@extend .clearfix; /* stylelint-disable-line */
}
.maputnik-zoom-spec-property-label {
@@ -49,7 +49,7 @@
padding-top: 0;
vertical-align: middle;
@extend .maputnik-icon-button;
@extend .maputnik-icon-button; /* stylelint-disable-line */
}
.maputnik-add-stop {
@@ -65,7 +65,7 @@
vertical-align: middle;
padding: 0 $margin-2 0 0;
@extend .maputnik-icon-button;
@extend .maputnik-icon-button; /* stylelint-disable-line */
}
.maputnik-data-spec-property {
-3
View File
@@ -28,9 +28,6 @@
height: 14px;
}
.maputnik-data-spec-property {
}
.maputnik-data-fieldset-inner {
background: $color-black;
border: solid 1px $color-midgray;