Skip to content

Commit

Permalink
Add prettier (#572)
Browse files Browse the repository at this point in the history
* Add prettier setup

* Update target directory

* Format files

* Bump minor

* Fix linting issue after formatting

* Run eslint on staged files as well

* Bump patch
  • Loading branch information
chawes13 authored Jul 7, 2022
1 parent eb5a6fa commit a6cf16f
Show file tree
Hide file tree
Showing 189 changed files with 3,243 additions and 2,444 deletions.
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run docs && git add docs.md
yarn run lint-staged
yarn run docs && git add docs.md
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage/*
build/*
esm/*
lib/*
config/*
node_modules/*
public/*
scripts/*
migration-guides/*
.github/*
.husky/*
76 changes: 37 additions & 39 deletions .storybook/styles/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,43 @@
*/

// Imports
@import "../../node_modules/bourbon/core/bourbon";
@import "../../node_modules/bourbon-neat/core/neat";
@import "datepicker";
@import '../../node_modules/bourbon/core/bourbon';
@import '../../node_modules/bourbon-neat/core/neat';
@import 'datepicker';

$output-bourbon-deprecation-warnings: false;
$output-bourbon-deprecation-warnings: false;

// Settings
@import "settings/settings";


// Base Styles
@import "base/typography";

// Exported component styles
@import "../../src/styles/modal";

// Components List
@import "components/buttons";
@import "components/footer";
@import "components/navigation";
@import "components/side-navigation";
@import "components/page-header";
@import "components/forms";
@import "components/table";
@import "components/spinner";
@import "components/flash";
@import "components/grid";
@import "components/empty-state";
@import "components/expander";
@import "components/blade";
@import "components/loading-container";
@import "components/progress-circle";
@import "components/login";
@import "components/pagination";
@import "components/sidebar-content";
@import "components/radio";
@import "components/tabs";

// Page Styles
@import "pages/main";
@import "pages/styleguide";

@import 'settings/settings';

// Base Styles
@import 'base/typography';

// Exported component styles
@import '../../src/styles/modal';

// Components List
@import 'components/buttons';
@import 'components/footer';
@import 'components/navigation';
@import 'components/side-navigation';
@import 'components/page-header';
@import 'components/forms';
@import 'components/table';
@import 'components/spinner';
@import 'components/flash';
@import 'components/grid';
@import 'components/empty-state';
@import 'components/expander';
@import 'components/blade';
@import 'components/loading-container';
@import 'components/progress-circle';
@import 'components/login';
@import 'components/pagination';
@import 'components/sidebar-content';
@import 'components/radio';
@import 'components/tabs';

// Page Styles
@import 'pages/main';
@import 'pages/styleguide';
48 changes: 31 additions & 17 deletions .storybook/styles/base/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Base Typography
// ========================================

html{
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
Expand All @@ -21,18 +21,17 @@ h2,
h3,
h4,
h5,
h6
{
h6 {
color: $black-base;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
letter-spacing: 1.75;
line-height: 1.1;

a{
a {
transition: all 0.3s ease-in-out;

&:hover{
&:hover {
text-decoration: underline;
}
}
Expand Down Expand Up @@ -61,9 +60,15 @@ h3 {
}
}

h4 { font-size: $s-bigger; }
h5 { font-size: $s-big; }
h6 { font-size: $s-big; }
h4 {
font-size: $s-bigger;
}
h5 {
font-size: $s-big;
}
h6 {
font-size: $s-big;
}

h4 {
text-transform: uppercase;
Expand All @@ -79,12 +84,13 @@ p {
font-size: $s-base;
}


&:last-child { @include rem(margin-bottom, 0); }
&:last-child {
@include rem(margin-bottom, 0);
}
}

li,
dd{
dd {
color: $black-base;
@include font-type($primary-sans-serif, normal, normal);
line-height: $base-line-height;
Expand All @@ -99,7 +105,8 @@ a {
border-bottom: 2px solid $blue-light;
font-size: $s-small;

&:hover, &:focus {
&:hover,
&:focus {
border-bottom: 2px solid $blue-base;
}

Expand All @@ -115,14 +122,21 @@ a {
border-bottom: 2px solid $blue-light;
}

strong, b { font-weight: $bold; }
i, em { font-style: italic; }

strong,
b {
font-weight: $bold;
}
i,
em {
font-style: italic;
}

b, i {
b,
i {
color: $black-base;
}

b, i {
b,
i {
font-size: $s-base;
}
50 changes: 24 additions & 26 deletions .storybook/styles/components/_blade.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@
Blade Header
-----------------------*/

.blade-header{
.blade-header {
color: $grey-base;
@include rem(margin-bottom, 10px);
}


/*-----------------------
Blade Contents
-----------------------*/
.blade{
.blade {
background-color: $white-base;
box-shadow: 0 0 17px 0 rgba(222,222,222,0.50);
box-shadow: 0 0 17px 0 rgba(222, 222, 222, 0.5);
cursor: pointer;
@include rem(margin-bottom, 10px);
@include rem(padding, 15px);
transition: all 0.3s ease-in-out;

&:hover{
&:hover {
background-color: $blue-light;
}

p{
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: normal;
}

.profile-thumb{
.profile-thumb {
background-color: $white-light;
border-radius: 50%;
display: inline-block;
Expand All @@ -39,38 +38,36 @@ Blade Contents
width: 42px;
vertical-align: -4px;

img{
img {
border-radius: 50%;
}
}

.text-block{
.text-block {
display: inline-block;
width: calc(100% - 58px);

p{
p {
margin: 0px;
}

span{
span {
color: $grey-base;
@include s-small;
}
}
}


.blade{

.center{
.blade {
.center {
@include rem(margin-top, 10px);
}

a{
a {
@include rem(margin-top, 5px);
}

span{
span {
border-radius: 50%;
display: inline-block;
height: 10px;
Expand All @@ -79,35 +76,36 @@ Blade Contents
@include rem(margin-right, 5px);
}

.is-complete span{
.is-complete span {
background-color: $green-base;
}

.in-progress span{
.in-progress span {
background-color: $yellow-base;
}

.is-late span{
.is-late span {
background-color: $red-base;
}
}

.status{
li{
.status {
li {
@include font-type($primary-sans-serif, normal, $regular);
@include s-small;
color: $grey-base;
display: inline-block;
line-height: normal;

&:before{
content: "/";
&:before {
content: '/';
display: inline-block;
@include rem(margin, 0px 2px);
}

&:first-child, &:nth-child(2){
&:before{
&:first-child,
&:nth-child(2) {
&:before {
display: none;
}
}
Expand Down
Loading

0 comments on commit a6cf16f

Please sign in to comment.