Skip to content

Commit fc514d0

Browse files
authored
Fixing lint with autofix (#1757)
* Fixing lint with autofix * Change again * last fix * Fix needless disables
1 parent 1714778 commit fc514d0

22 files changed

+88
-83
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"scripts": {
2626
"dist": "script/dist.js",
27-
"stylelint": "stylelint --quiet src/**/*.scss",
27+
"stylelint": "stylelint --quiet 'src/**/*.scss'",
2828
"eslint": "eslint deprecations.js __tests__ script",
2929
"prepublishOnly": "script/prepublish",
3030
"start": "yarn dev",

src/color-modes/themes/dark.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_dark.scss";
3+
@import '@primer/primitives/dist/scss/colors/_dark.scss';
44

55
@include color-mode-theme(dark) {
66
@include primer-colors-dark;

src/color-modes/themes/dark_colorblind.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_dark_colorblind.scss";
3+
@import '@primer/primitives/dist/scss/colors/_dark_colorblind.scss';
44

55
@include color-mode-theme(dark_colorblind) {
66
@include primer-colors-dark_colorblind;

src/color-modes/themes/dark_dimmed.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_dark_dimmed.scss";
3+
@import '@primer/primitives/dist/scss/colors/_dark_dimmed.scss';
44

55
@include color-mode-theme(dark_dimmed) {
66
@include primer-colors-dark_dimmed;

src/color-modes/themes/dark_high_contrast.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_dark_high_contrast.scss";
3+
@import '@primer/primitives/dist/scss/colors/_dark_high_contrast.scss';
44

55
@include color-mode-theme(dark_high_contrast) {
66
@include primer-colors-dark_high_contrast;

src/color-modes/themes/light.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_light.scss";
3+
@import '@primer/primitives/dist/scss/colors/_light.scss';
44

55
@include color-mode-theme(light, true) {
66
@include primer-colors-light;

src/color-modes/themes/light_colorblind.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_light_colorblind.scss";
3+
@import '@primer/primitives/dist/scss/colors/_light_colorblind.scss';
44

55
@include color-mode-theme(light_colorblind) {
66
@include primer-colors-light_colorblind;

src/color-modes/themes/light_high_contrast.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../../support/index.scss";
1+
@import '../../support/index.scss';
22

3-
@import "@primer/primitives/dist/scss/colors/_light_high_contrast.scss";
3+
@import '@primer/primitives/dist/scss/colors/_light_high_contrast.scss';
44

55
@include color-mode-theme(light_high_contrast) {
66
@include primer-colors-light_high_contrast;

src/docs.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// Only meant for the docs at https://primer.style/css
1010

1111
// CSS color variables
12-
@import "./color-modes/index.scss";
12+
@import './color-modes/index.scss';
1313

1414
// Global requirements
15-
@import "./core/index.scss";
16-
@import "./product/index.scss";
17-
@import "./marketing/index.scss";
15+
@import './core/index.scss';
16+
@import './product/index.scss';
17+
@import './marketing/index.scss';

src/index.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
// Should you need specific files, you can easily use separate `@import`s.
1212

1313
// CSS color variables
14-
@import "./color-modes/index.scss";
14+
@import './color-modes/index.scss';
1515

1616
// Global requirements
17-
@import "./core/index.scss";
18-
@import "./product/index.scss";
19-
@import "./marketing/index.scss";
17+
@import './core/index.scss';
18+
@import './product/index.scss';
19+
@import './marketing/index.scss';

src/marketing/buttons/button.scss

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
.btn-mktg {
2-
color: var(--color-canvas-default);
32
position: relative;
43
z-index: 1;
54
display: inline-block;
6-
appearance: none !important;
75
// stylelint-disable-next-line primer/spacing
86
padding: 0.9rem 1.5rem 1.1rem;
97
// stylelint-disable-next-line primer/typography
108
font-size: 1rem;
119
font-weight: $font-weight-bold;
1210
line-height: 1;
11+
color: var(--color-canvas-default);
1312
text-align: center;
1413
white-space: nowrap;
1514
vertical-align: middle;
1615
user-select: none;
16+
background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%), var(--color-mktg-btn-bg) !important;
1717
border: 0;
1818
// stylelint-disable-next-line primer/borders
1919
border-radius: 0.375rem;
20-
background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%),
21-
var(--color-mktg-btn-bg) !important;
2220
transition: box-shadow 0.2s;
21+
appearance: none !important;
2322

2423
&::before {
2524
position: absolute;
@@ -28,11 +27,11 @@
2827
bottom: 0;
2928
left: 0;
3029
z-index: -1;
31-
content: "";
32-
// stylelint-disable-next-line primer/borders
30+
content: '';
31+
// stylelint-disable-next-line primer/colors
32+
background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%) !important;
3333
border-radius: inherit;
3434
opacity: 0;
35-
background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%) !important;
3635
opacity: 0;
3736
transition: opacity 0.2s;
3837
background-blend-mode: normal;
@@ -44,8 +43,8 @@
4443

4544
&:focus,
4645
&.focus {
47-
box-shadow: var(--color-mktg-btn-shadow-focus), var(--color-mktg-btn-shadow-hover) !important;
4846
outline: 0;
47+
box-shadow: var(--color-mktg-btn-shadow-focus), var(--color-mktg-btn-shadow-hover) !important;
4948
}
5049

5150
&:hover,
@@ -62,6 +61,7 @@
6261

6362
&:active {
6463
outline: none;
64+
// stylelint-disable-next-line primer/box-shadow
6565
box-shadow: 0 0 0 transparent;
6666

6767
&::before {
@@ -89,10 +89,12 @@
8989
}
9090

9191
&:active {
92+
// stylelint-disable-next-line primer/box-shadow
9293
box-shadow: var(--color-fg-default) 0 0 0 3px inset !important;
9394
}
9495

9596
&:disabled {
97+
// stylelint-disable-next-line primer/box-shadow
9698
box-shadow: var(--color-fg-subtle) 0 0 0 1px inset !important;
9799
}
98100
}
@@ -117,14 +119,18 @@
117119
}
118120

119121
.btn-signup-mktg {
122+
// stylelint-disable-next-line primer/colors
120123
color: #fff;
124+
// stylelint-disable-next-line primer/colors
121125
background: linear-gradient(180deg, rgba(52, 183, 89, 0.15) 0%, rgba(46, 164, 79, 0) 100%), rgb(46, 164, 79) !important;
122126

123127
&::before {
128+
// stylelint-disable-next-line primer/colors
124129
background: linear-gradient(180deg, rgba(52, 183, 89, 0.15) 0%, rgba(46, 164, 79, 0) 100%) !important;
125130
}
126131

127132
&:focus {
133+
// stylelint-disable-next-line primer/box-shadow
128134
box-shadow: rgba(46, 164, 79, 0.45) 0 0 0 4px !important;
129135
}
130136
}

src/marketing/buttons/index.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// support files
2-
@import "../support/index.scss";
3-
@import "./button.scss";
2+
@import '../support/index.scss';
3+
@import './button.scss';

src/marketing/support/index.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
@import "../../support/index.scss";
2-
@import "./variables.scss";
1+
@import '../../support/index.scss';
2+
@import './variables.scss';

src/marketing/support/variables.scss

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// stylelint-disable unit-no-unknown
21
// Typography
3-
$marketing-font-path: "/fonts/" !default;
2+
$marketing-font-path: '/fonts/' !default;
43

54
$font-mktg: $body-font !default;
65
$font-weight-medium: 450 !default;
@@ -122,7 +121,7 @@ $transition-time: 0.4s !default;
122121
$ease-mktg: cubic-bezier(0.16, 1, 0.3, 1) !default;
123122

124123
$marketing-position-variants: (
125-
"": "",
126-
md: "-md",
127-
lg: "-lg",
124+
'': '',
125+
md: '-md',
126+
lg: '-lg',
128127
) !default;

src/marketing/type/index.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// support files
2-
@import "../support/index.scss";
3-
@import "./typography.scss";
2+
@import '../support/index.scss';
3+
@import './typography.scss';

src/marketing/type/typography.scss

+23-23
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,35 @@
1919
$pairing-md: map-get($mktg-header-pairings, nth($sizes, 2));
2020
$pairing-lg: map-get($mktg-header-pairings, nth($sizes, 3));
2121

22-
font-size: map-get($pairing, "size") !important;
23-
line-height: map-get($pairing, "lh") !important;
24-
@if (map-get($pairing, "size") >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
22+
font-size: map-get($pairing, 'size') !important;
23+
line-height: map-get($pairing, 'lh') !important;
24+
@if (map-get($pairing, 'size') >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
2525

2626
@if (nth($sizes, 1) != nth($sizes, 2)) {
2727
@include breakpoint(md) {
28-
font-size: map-get($pairing-md, "size") !important;
29-
line-height: map-get($pairing-md, "lh") !important;
28+
font-size: map-get($pairing-md, 'size') !important;
29+
line-height: map-get($pairing-md, 'lh') !important;
3030

31-
@if (map-get($pairing-md, "size") >= $mktg-header-spacing-threshold and map-get($pairing, "size") < $mktg-header-spacing-threshold) {
31+
@if (map-get($pairing-md, 'size') >= $mktg-header-spacing-threshold and map-get($pairing, 'size') < $mktg-header-spacing-threshold) {
3232
letter-spacing: $mktg-header-spacing-large !important;
3333
}
3434

35-
@if (map-get($pairing-md, "size") >= $mktg-header-weight-threshold and map-get($pairing, "size") < $mktg-header-weight-threshold) {
35+
@if (map-get($pairing-md, 'size') >= $mktg-header-weight-threshold and map-get($pairing, 'size') < $mktg-header-weight-threshold) {
3636
font-weight: $mktg-header-weight-large !important;
3737
}
3838
}
3939
}
4040

4141
@if (nth($sizes, 2) != nth($sizes, 3)) {
4242
@include breakpoint(lg) {
43-
font-size: map-get($pairing-lg, "size") !important;
44-
line-height: map-get($pairing-lg, "lh") !important;
43+
font-size: map-get($pairing-lg, 'size') !important;
44+
line-height: map-get($pairing-lg, 'lh') !important;
4545

46-
@if (map-get($pairing-lg, "size") >= $mktg-header-spacing-threshold and map-get($pairing-md, "size") < $mktg-header-spacing-threshold) {
46+
@if (map-get($pairing-lg, 'size') >= $mktg-header-spacing-threshold and map-get($pairing-md, 'size') < $mktg-header-spacing-threshold) {
4747
letter-spacing: $mktg-header-spacing-large !important;
4848
}
4949

50-
@if (map-get($pairing-lg, "size") >= $mktg-header-weight-threshold and map-get($pairing-md, "size") < $mktg-header-weight-threshold) {
50+
@if (map-get($pairing-lg, 'size') >= $mktg-header-weight-threshold and map-get($pairing-md, 'size') < $mktg-header-weight-threshold) {
5151
font-weight: $mktg-header-weight-large !important;
5252
}
5353
}
@@ -73,36 +73,36 @@
7373
$pairing-md: map-get($mktg-body-pairings, nth($sizes, 2));
7474
$pairing-lg: map-get($mktg-body-pairings, nth($sizes, 3));
7575

76-
font-size: map-get($pairing, "size") !important;
77-
line-height: map-get($pairing, "lh") !important;
78-
@if (map-get($pairing, "size") >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
79-
@if (map-get($pairing, "size") >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
76+
font-size: map-get($pairing, 'size') !important;
77+
line-height: map-get($pairing, 'lh') !important;
78+
@if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
79+
@if (map-get($pairing, 'size') >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
8080

8181
@if (nth($sizes, 1) != nth($sizes, 2)) {
8282
@include breakpoint(md) {
83-
font-size: map-get($pairing-md, "size") !important;
84-
line-height: map-get($pairing-md, "lh") !important;
83+
font-size: map-get($pairing-md, 'size') !important;
84+
line-height: map-get($pairing-md, 'lh') !important;
8585

86-
@if (map-get($pairing-md, "size") >= $mktg-body-spacing-threshold and map-get($pairing, "size") < $mktg-body-spacing-threshold) {
86+
@if (map-get($pairing-md, 'size') >= $mktg-body-spacing-threshold and map-get($pairing, 'size') < $mktg-body-spacing-threshold) {
8787
letter-spacing: $mktg-body-spacing-large !important;
8888
}
8989

90-
@if (map-get($pairing-md, "size") >= $mktg-body-weight-threshold and map-get($pairing, "size") < $mktg-body-weight-threshold) {
90+
@if (map-get($pairing-md, 'size') >= $mktg-body-weight-threshold and map-get($pairing, 'size') < $mktg-body-weight-threshold) {
9191
font-weight: $font-weight-medium;
9292
}
9393
}
9494
}
9595

9696
@if (nth($sizes, 2) != nth($sizes, 3)) {
9797
@include breakpoint(lg) {
98-
font-size: map-get($pairing-lg, "size") !important;
99-
line-height: map-get($pairing-lg, "lh") !important;
98+
font-size: map-get($pairing-lg, 'size') !important;
99+
line-height: map-get($pairing-lg, 'lh') !important;
100100

101-
@if (map-get($pairing-lg, "size") >= $mktg-body-spacing-threshold and map-get($pairing-md, "size") < $mktg-body-spacing-threshold) {
101+
@if (map-get($pairing-lg, 'size') >= $mktg-body-spacing-threshold and map-get($pairing-md, 'size') < $mktg-body-spacing-threshold) {
102102
letter-spacing: $mktg-body-spacing-large !important;
103103
}
104104

105-
@if (map-get($pairing-lg, "size") >= $mktg-body-weight-threshold and map-get($pairing-md, "size") < $mktg-body-weight-threshold) {
105+
@if (map-get($pairing-lg, 'size') >= $mktg-body-weight-threshold and map-get($pairing-md, 'size') < $mktg-body-weight-threshold) {
106106
font-weight: $font-weight-medium;
107107
}
108108
}

src/marketing/utilities/index.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import "../support/index.scss";
1+
@import '../support/index.scss';
22
// utilities
3-
@import "./animations.scss";
4-
@import "./borders.scss";
5-
@import "./filters.scss";
6-
@import "./layout.scss";
3+
@import './animations.scss';
4+
@import './borders.scss';
5+
@import './filters.scss';
6+
@import './layout.scss';

src/marketing/utilities/layout.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@each $breakpoint, $variant in $marketing-position-variants {
77
@include breakpoint($breakpoint) {
88
@each $scale, $size in $spacer-map-extended {
9-
@if ($size != 0 or $variant != "") {
9+
@if ($size != 0 or $variant != '') {
1010
.top#{$variant}-#{$scale} { top: $size !important; }
1111
.right#{$variant}-#{$scale} { right: $size !important; }
1212
.bottom#{$variant}-#{$scale} { bottom: $size !important; }

src/support/mixins/layout.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Responsive media queries
22

33
@mixin breakpoint($breakpoint) {
4-
@if $breakpoint == "" {
4+
@if $breakpoint == '' {
55
@content;
66
}
77

@@ -19,8 +19,8 @@
1919

2020
// If the key doesn't exist in the map
2121
@else {
22-
@warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
23-
+ "Please make sure it is defined in `$breakpoints` map.";
22+
@warn 'Unfortunately, no value could be retrieved from `#{$breakpoint}`. '
23+
+ 'Please make sure it is defined in `$breakpoints` map.';
2424
}
2525
}
2626
}
@@ -47,12 +47,12 @@
4747
@mixin clearfix {
4848
&::before {
4949
display: table;
50-
content: "";
50+
content: '';
5151
}
5252

5353
&::after {
5454
display: table;
5555
clear: both;
56-
content: "";
56+
content: '';
5757
}
5858
}

src/support/mixins/misc.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
width: 8px;
1111
height: 16px;
1212
pointer-events: none;
13-
content: " ";
13+
content: ' ';
1414
clip-path: polygon(0 50%, 100% 0, 100% 100%);
1515
}
1616

0 commit comments

Comments
 (0)