Skip to content

Commit

Permalink
chore(lint): fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Sep 13, 2023
1 parent 3d2182f commit 9b77521
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"format": "prettier --cache --write '**/*.{js,md,scss,ts,tsx}' '!**/{build,es,lib,storybook,ts,umd}/**'",
"format:diff": "prettier --list-different '**/*.{js,md,scss,ts,tsx}' '!**/{build,es,lib,storybook,ts,umd}/**' '!packages/components/**'",
"lint": "eslint actions config packages www",
"lint:styles": "stylelint '**/*.{css,scss}' --report-needless-disables --report-invalid-scope-disables",
"lint:styles": "stylelint '**/*.scss' --report-needless-disables --report-invalid-scope-disables",
"sync": "carbon-cli sync",
"test": "cross-env BABEL_ENV=test jest",
"test:e2e": "cross-env BABEL_ENV=test jest -c jest.e2e.config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/components/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ $button-focus-color: custom-property.get-var('button-focus-color', $focus);
display: inline-flex;
flex-shrink: 0;
justify-content: space-between;
border-radius: $button-border-radius;
// Fix to remove added margins on buttons in safari (see #5155)
margin: 0;
border-radius: $button-border-radius;
cursor: pointer;
inline-size: max-content;
max-inline-size: convert.to-rem(320px);
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/components/checkbox/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@
// text overflows.
position: absolute;
border: 1px solid $icon-primary;
border-radius: 2px;
// increase left margin for #6480
margin: convert.to-rem(2px) convert.to-rem(2px) convert.to-rem(2px)
convert.to-rem(3px);

// Checkboxes with a background color look visually off against a parent container.
background-color: transparent;
block-size: convert.to-rem(16px);
border-radius: 2px;
content: '';

// According to the spec, we'll want the bounding box for our checkbox to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ $copy-btn-feedback: $background-inverse !default;
display: inline;
padding: 0;
border: 1px solid transparent;
background-color: $layer;
border-radius: 4px;
background-color: $layer;
color: $text-primary;
cursor: pointer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
box-sizing: border-box;
padding: 0;
border: 0;
animation: none;
border-radius: 0;
animation: none;
direction: ltr;
inline-size: convert.to-rem(315px);
max-block-size: 0;
Expand Down
4 changes: 2 additions & 2 deletions packages/styles/scss/components/list-box/_list-box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ $list-box-menu-width: convert.to-rem(300px);
align-items: center;
justify-content: space-between;
padding: convert.to-rem(8px);
border-radius: convert.to-rem(12px);
background-color: $background-inverse;
block-size: convert.to-rem(24px);
border-radius: convert.to-rem(12px);
color: $text-inverse;
inline-size: auto;
inset-block-start: auto;
Expand All @@ -485,8 +485,8 @@ $list-box-menu-width: convert.to-rem(300px);
margin-inline-start: convert.to-rem(4px);

&:hover {
background-color: $button-secondary-hover;
border-radius: 50%;
background-color: $button-secondary-hover;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
display: inline-flex;
box-sizing: border-box;
border: 0;
border-radius: 0;

// Firefox: Hide spinner (up and down buttons)
-moz-appearance: textfield;
appearance: textfield;
background-color: $field;
block-size: convert.to-rem(40px);
border-block-end: convert.to-rem(1px) solid $border-strong;
border-radius: 0;
color: $text-primary;
font-family: font-family('sans');
font-weight: 400;
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/components/popover/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ $popover-caret-height: custom-property.get-var(
position: absolute;
z-index: z('floating');
display: none;
background-color: $popover-background-color;
border-radius: $popover-border-radius;
background-color: $popover-background-color;
color: $popover-text-color;
inline-size: max-content;
max-inline-size: convert.to-rem(368px);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ $progress-indicator-bar-width: 1px inset transparent !default;
position: relative;
z-index: 1;
flex-shrink: 0;
block-size: $spacing-05;
border-radius: 50%;
block-size: $spacing-05;
fill: $interactive;
inline-size: $spacing-05;
margin-block-start: convert.to-rem(10px);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ $radio-border-width: 1px !default;

flex-shrink: 0;
border: $radio-border-width solid $icon-primary;
border-radius: 50%;
background-color: transparent;
block-size: convert.to-rem(18px);
border-radius: 50%;
inline-size: convert.to-rem(18px);
margin-block: convert.to-rem(1px) convert.to-rem(2px);
margin-inline: convert.to-rem(2px) $spacing-03;
Expand All @@ -102,9 +102,9 @@ $radio-border-width: 1px !default;
&::before {
position: relative;
display: inline-block;
border-radius: 50%;
background-color: $icon-primary;
block-size: 100%;
border-radius: 50%;
content: '';
inline-size: 100%;
transform: scale(0.5);
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@

display: block;
border: none;
border-radius: 0;
appearance: none;
background-color: $field;
block-size: convert.to-rem(40px);
border-block-end: 1px solid $border-strong;
border-radius: 0;
color: $text-primary;
cursor: pointer;
font-family: inherit;
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/components/slider/_slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
.#{$prefix}--slider__thumb {
position: absolute;
z-index: 3;
border-radius: 50%;
background: $layer-selected-inverse;
block-size: convert.to-rem(14px);
border-radius: 50%;
box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px transparent;
inline-size: convert.to-rem(14px);
outline: none;
Expand Down
4 changes: 2 additions & 2 deletions packages/styles/scss/components/tag/_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
display: inline-flex;
align-items: center;
justify-content: center;
margin: $spacing-02;
border-radius: convert.to-rem(15px);
margin: $spacing-02;
cursor: default;
// restricts size of contained elements
max-inline-size: 100%;
Expand Down Expand Up @@ -186,10 +186,10 @@
justify-content: center;
padding: 0;
border: 0;
border-radius: 50%;
margin: 0 0 0 convert.to-rem(2px);
background-color: transparent;
block-size: layout.size('height');
border-radius: 50%;
color: currentColor;
cursor: pointer;
inline-size: layout.size('height');
Expand Down
7 changes: 4 additions & 3 deletions packages/styles/scss/components/toggle/_toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@

.#{$prefix}--toggle__switch {
position: relative;
border-radius: convert.to-rem(12px);
background-color: $toggle-off;
block-size: convert.to-rem(24px);
border-radius: convert.to-rem(12px);
inline-size: convert.to-rem(48px);
transition: background-color $duration-fast-01 motion(exit, productive);

&::before {
position: absolute;
border-radius: 50%;
background-color: $icon-on-color;
block-size: convert.to-rem(18px);
border-radius: 50%;
content: '';
inline-size: convert.to-rem(18px);
inset-block-start: convert.to-rem(3px);
Expand Down Expand Up @@ -204,9 +204,10 @@
.#{$prefix}--toggle--skeleton .#{$prefix}--toggle__skeleton-circle {
@include circular-skeleton;

block-size: convert.to-rem(18px);
border-radius: 50%;

block-size: convert.to-rem(18px);

inline-size: convert.to-rem(18px);
}

Expand Down
3 changes: 2 additions & 1 deletion packages/styles/scss/components/tooltip/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ $tooltip-padding-inline: custom-property.get-var(
.#{$prefix}--definition-term {
@include button-reset.reset;

border-block-end: 1px dotted theme.$border-strong;
border-radius: 0;

border-block-end: 1px dotted theme.$border-strong;

color: theme.$text-primary;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/utilities/_skeleton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
@mixin circular-skeleton {
position: relative;
overflow: hidden;
background: $skeleton-background;
border-radius: 50%;
background: $skeleton-background;

&::before {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/utilities/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
convert.to-rem(8px) convert.to-rem(16px),
convert.to-rem(3px) convert.to-rem(16px)
);
border-radius: convert.to-rem(2px);
background-color: $background-inverse;
block-size: auto;
border-radius: convert.to-rem(2px);
color: $text-inverse;
font-weight: 400;
inline-size: max-content;
Expand Down

0 comments on commit 9b77521

Please sign in to comment.