Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Stylelint to 16.10.0 #7078

Merged
merged 5 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"ignoreAtRules": ["use"]
}],
"scss/media-feature-value-dollar-variable": null,
"selector-max-universal": 1,
"indentation": null,
"max-line-length": null
"selector-max-universal": 1
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"octokit": "^3.1.2",
"prettier": "^3.2.4",
"sinon": "^17.0.1",
"stylelint": "~14.16.1",
"stylelint-config-palantir": "^6.0.1",
"stylelint-scss": "^5.3.2",
"stylelint": "~16.10.0",
"stylelint-config-palantir": "^7.4.0",
"stylelint-scss": "^6.8.1",
"typescript": "~5.3.3",
"yargs": "^17.7.2",
"yarn-deduplicate": "^6.0.2"
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/common/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ $pt-dark-intent-text-colors: (
}

@mixin position-all($position, $value) {
bottom: $value;
left: $value;
inset: $value;
position: $position;
right: $value;
top: $value;
}

@mixin base-typography() {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/dialog/_multistep-dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ $step-radius: $pt-border-radius * 2 !default;
}

.#{$ns}-multistep-dialog-left-panel {
border-radius: 0 0 $dialog-border-radius 0;
border-radius: 0 0 $dialog-border-radius;
}

.#{$ns}-multistep-dialog-right-panel {
Expand Down Expand Up @@ -114,7 +114,7 @@ $step-radius: $pt-border-radius * 2 !default;
.#{$ns}-multistep-dialog-right-panel {
background-color: $light-gray5;
border-left: 1px solid $pt-divider-black;
border-radius: 0 0 $dialog-border-radius 0;
border-radius: 0 0 $dialog-border-radius;
flex: 3;
min-width: 0;

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/components/icon/_icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@

// muted icon style used by NonIdealState
&.#{$ns}-icon-muted svg {
fill-opacity: 15%;
fill-opacity: 0.15;
// need to show overflow for some strokes on paths that reach the edge of the icon bounding box
overflow: visible;

path {
stroke: $gray3;
stroke-opacity: 50%;
stroke-opacity: 0.5;
stroke-width: 0.5px;
}
}

.#{$ns}-dark & {
.#{$ns}-icon-muted svg {
fill-opacity: 20%;
fill-opacity: 0.2;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/spinner/_spinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}

path {
fill-opacity: 0%;
fill-opacity: 0;
}

.#{$ns}-spinner-head {
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/components/tabs/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ $tab-indicator-width: 3px !default;
.#{$ns}-tab-indicator-wrapper .#{$ns}-tab-indicator {
background-color: rgba($pt-intent-primary, 0.2);
border-radius: $pt-border-radius;
bottom: 0;
height: auto;
left: 0;
right: 0;
top: 0;
inset: 0;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// need to disable hover styles for all variants of selected dates

/* prettier-ignore */
&:not(.DayPicker-Day--selected):not(.DayPicker-Day--selected-range):not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--selected-range-end) {
&:not(.DayPicker-Day--selected, .DayPicker-Day--selected-range, .DayPicker-Day--selected-range-start, .DayPicker-Day--selected-range-end) {
background-color: $daterangepicker-range-background-color;
}
}
Expand All @@ -55,13 +55,13 @@
// need to set rounded corners

/* prettier-ignore */
&--selected-range-start:not(.DayPicker-Day--selected-range-end):not(.DayPicker-Day--hovered-range-end) {
&--selected-range-start:not(.DayPicker-Day--selected-range-end, .DayPicker-Day--hovered-range-end) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}

/* prettier-ignore */
&--selected-range-end:not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--hovered-range-start) {
&--selected-range-end:not(.DayPicker-Day--selected-range-start, .DayPicker-Day--hovered-range-start) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
Expand All @@ -83,7 +83,7 @@
color: $light-gray5;

/* prettier-ignore */
&:not(.DayPicker-Day--selected):not(.DayPicker-Day--selected-range):not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--selected-range-end) {
&:not(.DayPicker-Day--selected, .DayPicker-Day--selected-range, .DayPicker-Day--selected-range-start, .DayPicker-Day--selected-range-end) {
background-color: $dark-daterangepicker-range-background-color;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}

// need some extra specificity here to override rdp default styles
&:not([disabled]):not(.rdp-day_selected) {
&:not([disabled], .rdp-day_selected) {
&:hover,
&:focus {
background: $datepicker-day-background-color-hover;
Expand Down Expand Up @@ -157,7 +157,7 @@
}

// need some extra specificity here to override rdp default styles
&:not([disabled]):not(.rdp-day_selected) {
&:not([disabled], .rdp-day_selected) {
&:hover,
&:focus {
background: $dark-datepicker-day-background-color-hover;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
color: $blue2;

// need to disable hover styles for all variants of selected dates
&:not(.rdp-day_range_start):not(.rdp-day_range_middle):not(.rdp-day_range_end) {
&:not(.rdp-day_range_start, .rdp-day_range_middle, .rdp-day_range_end) {
background-color: $daterangepicker-range-background-color;
}
}
Expand All @@ -88,12 +88,12 @@
}
}

&_range_start:not(.rdp-day_range_end):not(.rdp-day_hovered_end) {
&_range_start:not(.rdp-day_range_end, .rdp-day_hovered_end) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}

&_range_end:not(.rdp-day_range_start):not(.rdp_day_hovered_start) {
&_range_end:not(.rdp-day_range_start, .rdp_day_hovered_start) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
Expand Down Expand Up @@ -133,7 +133,7 @@
color: $light-gray5;

/* prettier-ignore */
&:not(.rdp-day_selected):not(.rdp-day_range_start):not(.rdp-day_range_middle):not(.rdp-day_range_end) {
&:not(.rdp-day_selected, .rdp-day_range_start, .rdp-day_range_middle, .rdp-day_range_end) {
background-color: $dark-daterangepicker-range-background-color;
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/docs-app/src/styles/_examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,7 @@ $docs-hotkey-piano-height: 510px;
background: $light-gray3;
border-radius: $pt-border-radius;
flex: 1 1 auto;
overflow-x: scroll;
overflow-y: hidden;
overflow: scroll hidden;
position: relative;

.#{$ns}-dark & {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-theme/src/styles/_examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ $example-spacing: $pt-grid-size * 4;
transition: background-color $pt-transition-duration $pt-transition-ease;
}

&:not(:hover):not(:active) {
&:not(:hover, :active) {
background-color: $pt-app-elevated-background-color;

.#{$ns}-dark & {
Expand Down
2 changes: 1 addition & 1 deletion packages/node-build-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"sass": "^1.70.0",
"source-map-js": "^1.0.2",
"strip-css-comments": "^5.0.0",
"stylelint": "~14.16.1",
"stylelint": "~16.10.0",
"stylelint-junit-formatter": "^0.2.2",
"svgo": "^1.3.2",
"typescript": "~5.3.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"dependencies": {
"@blueprintjs/colors": "workspace:^",
"postcss": "^8.4.33",
"postcss-selector-parser": "^6.0.15",
"postcss-selector-parser": "^7.0.0",
"postcss-value-parser": "^4.2.0"
},
"peerDependencies": {
"stylelint": "^14.12.1 || ^15.10.3"
"stylelint": "^14.12.1 || ^15.10.3 || ^16.10.0"
},
"devDependencies": {
"@blueprintjs/node-build-scripts": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
import noColorLiteral from "./rules/no-color-literal";
import noPrefixLiteral from "./rules/no-prefix-literal";

export default [noPrefixLiteral, noColorLiteral];
export = [noColorLiteral, noPrefixLiteral];
15 changes: 3 additions & 12 deletions packages/table-dev-app/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@

body {
background-color: $pt-app-background-color;
bottom: 0;
left: 0;
inset: 0;

margin: 0;
padding: 0;
position: absolute;
right: 0;
top: 0;

.#{$ns}-dark {
background-color: $pt-dark-app-background-color;
Expand All @@ -24,11 +21,8 @@ body {

/* stylelint-disable-next-line selector-max-id */
#page-content {
bottom: 0;
left: 0;
inset: $pt-navbar-height 0 0;
position: absolute;
right: 0;
top: $pt-navbar-height;
}

/**
Expand All @@ -46,13 +40,10 @@ body {
* See: http://wilsonpage.co.uk/introducing-layout-boundaries/
*/
.layout-boundary {
bottom: 0;
display: block;
left: 0;
inset: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
}

.container {
Expand Down
5 changes: 1 addition & 4 deletions packages/table/src/cell/_cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@
}

.#{$ns}-table-editable-text {
bottom: 0;
left: 0;
inset: 0;
padding: $cell-padding;
position: absolute;
right: 0;
top: 0;
}

.#{$ns}-table-cell-text-placeholder {
Expand Down
4 changes: 4 additions & 0 deletions packages/table/src/headers/_headers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ $dark-selectable-header-menu-selected-hover-background: menu-background(
bottom: -$cell-padding-vertical;
left: -$cell-padding-horizontal + $cell-border-width - 2px;
right: -$cell-padding-horizontal + $cell-border-width - 1px;
// The shorthand makes this hard to read.
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
top: -$cell-padding-vertical + $cell-border-width - 2px;
}

Expand All @@ -310,6 +312,8 @@ $dark-selectable-header-menu-selected-hover-background: menu-background(
cursor: $select-text-cursor;
left: -$cell-padding-horizontal + $cell-border-width - 1px;
right: -$cell-padding-horizontal + $cell-border-width;
// The shorthand makes this hard to read.
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
top: -$cell-padding-vertical + $cell-border-width - 1px;
}

Expand Down
5 changes: 1 addition & 4 deletions packages/table/src/layers/_layers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ $region-default-color: $gray3 !default;
$region-selected-color: $pt-intent-primary !default;

.#{$ns}-table-overlay-layer {
bottom: 0;
left: 0;
inset: 0;
overflow: hidden;
pointer-events: none;
position: absolute;
right: 0;
top: 0;
z-index: $region-layer-z-index;
}

Expand Down
13 changes: 3 additions & 10 deletions packages/table/src/quadrants/_quadrants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ $scroll-container-overflow-high-dpi: 10px; // for device pixel-ratio >2.5
}

.#{$ns}-table-quadrant-scroll-container {
bottom: 0;
left: 0;
inset: 0;
overflow: auto;
position: relative;
right: 0;
top: 0;
user-select: none;
will-change: transform; // forces hardware acceleration for smoother animations

Expand All @@ -58,12 +55,9 @@ $scroll-container-overflow-high-dpi: 10px; // for device pixel-ratio >2.5
}

.#{$ns}-table-body-scrolling-indicator-overlay {
bottom: 0;
left: 0;
inset: 0;
pointer-events: none;
position: absolute;
right: 0;
top: 0;
z-index: 1;
}

Expand Down Expand Up @@ -160,8 +154,7 @@ $scroll-container-overflow-high-dpi: 10px; // for device pixel-ratio >2.5

.#{$ns}-table-quadrant-scroll-container {
bottom: -$scroll-container-overflow-default;
overflow-x: hidden;
overflow-y: hidden;
overflow: hidden;
right: -$scroll-container-overflow-default;
}

Expand Down
Loading