Skip to content

Commit

Permalink
IBX-2677: As a developer I want to have prettier and eslint style che…
Browse files Browse the repository at this point in the history
…ck/fix (#393)

* init

* added prettier script

* added all scripts

* prettier fixes

* reorder package.json props

* added scss run
  • Loading branch information
GrabowskiM authored May 2, 2022
1 parent d11f195 commit df122d6
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "eslint-config-ibexa"
"extends": "eslint-config-ibexa/eslint"
}
2 changes: 2 additions & 0 deletions .github/workflows/frontend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on:
push:
paths:
- "**.js"
- "**.scss"
branches:
- main
- '[0-9]+.[0-9]+'
pull_request:
paths:
- "**.js"
- "**.scss"

jobs:
frontend-test:
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
"name": "admin-ui",
"repository": "git@github.com:ibexa/admin-ui.git",
"private": true,
"prettier": "eslint-config-ibexa/prettier",
"dependencies": {},
"devDependencies": {
"eslint-config-ibexa": "https://github.com/ibexa/eslint-config-ibexa.git"
"eslint-config-ibexa": "https://github.com/ibexa/eslint-config-ibexa.git#v1.0.0"
},
"scripts": {
"test": "yarn eslint-test",
"eslint-test": "eslint \"./src/bundle/Resources/**/*.js\" \"./src/bundle/ui-dev/**/*.js\""
"test": "yarn prettier-test && yarn eslint-test",
"fix": "yarn prettier-test --write && yarn eslint-test --fix",
"eslint-test": "eslint \"./src/bundle/Resources/**/*.js\" \"./src/bundle/ui-dev/**/*.js\"",
"prettier-test": "yarn prettier \"./src/bundle/Resources/**/*.{js,scss}\" \"./src/bundle/ui-dev/**/*.js\" --check"
}
}
32 changes: 16 additions & 16 deletions src/bundle/Resources/public/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ $grays: (
600: $ibexa-color-light-500,
700: $ibexa-color-light,
800: $ibexa-color-light,
900: $ibexa-color-dark-300
900: $ibexa-color-dark-300,
);

$blue: $ibexa-color-primary;
Expand All @@ -193,19 +193,19 @@ $purple: #6f42c1 !default;
$cyan: #17a2b8 !default;

$colors: (
"blue": $ibexa-color-primary,
"red": $ibexa-color-primary,
"orange": $ibexa-color-primary,
"yellow": $ibexa-color-warning,
"green": $ibexa-color-success,
"teal": $ibexa-color-white,
"white": $ibexa-color-white,
"gray": $ibexa-color-dark-300,
"gray-dark": $pink,
"indigo": $indigo,
"purple": $purple,
"pink": $pink,
"cyan": $cyan
'blue': $ibexa-color-primary,
'red': $ibexa-color-primary,
'orange': $ibexa-color-primary,
'yellow': $ibexa-color-warning,
'green': $ibexa-color-success,
'teal': $ibexa-color-white,
'white': $ibexa-color-white,
'gray': $ibexa-color-dark-300,
'gray-dark': $pink,
'indigo': $indigo,
'purple': $purple,
'pink': $pink,
'cyan': $cyan,
);

$theme-colors: (
Expand All @@ -216,7 +216,7 @@ $theme-colors: (
danger: $ibexa-color-danger,
light: $ibexa-color-light-200,
dark: $ibexa-color-dark,
info: $cyan
info: $cyan,
);

// Typography
Expand Down Expand Up @@ -314,7 +314,7 @@ $container-max-widths: (
sm: 540px,
md: 720px,
lg: 960px,
xl: 1470px
xl: 1470px,
) !default;

//Inputs
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/public/scss/_flatpickr.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.ibexa-content-view .flatpickr-calendar {
&.animate.open {
-webkit-animation: eZfpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
animation: eZfpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
animation: eZfpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
}

Expand All @@ -19,7 +19,7 @@
from {
opacity: 0;
}

to {
opacity: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/public/scss/_list-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
display: flex;
}

input[type="search"],
input[type='search'],
.ibexa-input-text-wrapper {
width: calculateRem(410px);
}
Expand Down
1 change: 0 additions & 1 deletion src/bundle/Resources/public/scss/_tag-view-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
}
}


&__selected-item-tag-ellipsize {
display: inline-block;
}
Expand Down
6 changes: 3 additions & 3 deletions src/bundle/Resources/public/scss/mixins/_general.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@mixin container-box-shadow-right {
box-shadow: calculateRem(12px) 0 calculateRem(12px) calculateRem(-12px) rgba(34,34,34,0.25);
box-shadow: calculateRem(12px) 0 calculateRem(12px) calculateRem(-12px) rgba(34, 34, 34, 0.25);
}

@mixin container-box-shadow-left {
box-shadow: calculateRem(-12px) 0 calculateRem(12px) calculateRem(-12px) rgba(34,34,34,0.25);
box-shadow: calculateRem(-12px) 0 calculateRem(12px) calculateRem(-12px) rgba(34, 34, 34, 0.25);
}

@mixin container-box-shadow {
box-shadow: 0 0 calculateRem(12px) calculateRem(-4px) rgba(34,34,34,0.25);
box-shadow: 0 0 calculateRem(12px) calculateRem(-4px) rgba(34, 34, 34, 0.25);
}
2 changes: 1 addition & 1 deletion src/bundle/Resources/public/scss/polyfill/_div.import.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@forward "sass:math" show div;
@forward 'sass:math' show div;
2 changes: 1 addition & 1 deletion src/bundle/Resources/public/scss/polyfill/_div.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@function div($number1, $number2) {
@return $number1 / $number2;
@return $number1 / $number2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@
color: $ibexa-color-dark;
text-decoration: underline;
font-size: $ibexa-text-font-size-medium;
transition: background $ibexa-admin-transition-duration $ibexa-admin-transition, color $ibexa-admin-transition-duration $ibexa-admin-transition;
transition: background $ibexa-admin-transition-duration $ibexa-admin-transition,
color $ibexa-admin-transition-duration $ibexa-admin-transition;

.ibexa-icon {
fill: $ibexa-color-dark;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
&__no-items-message {
padding: calculateRem(10px);
font-size: $ibexa-text-font-size-small;
color:$ibexa-color-dark-400;
color: $ibexa-color-dark-400;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
justify-content: space-between;
align-items: center;
padding: calculateRem(12px) calculateRem(12px) calculateRem(12px) calculateRem(32px);

}

&__selection-counter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
height: calculateRem(1.5px);
width: calculateRem(24px);
background-color: $ibexa-color-dark-200;

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

.c-upload-list .c-upload-list-item + .c-upload-list-item {
border-top: 1px solid #a8c8d5;
}
}

0 comments on commit df122d6

Please sign in to comment.