Skip to content

Commit af8b0ca

Browse files
committed
linter fixes
1 parent 8df4e42 commit af8b0ca

File tree

5 files changed

+77
-74
lines changed

5 files changed

+77
-74
lines changed

.github/linters/.stylelintrc.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"number-leading-zero": null,
88
"color-function-notation": null,
99
"no-descending-specificity": null,
10-
"selector-class-pattern": null
10+
"selector-class-pattern": null,
11+
"scss/at-import-partial-extension": null,
12+
"property-no-vendor-prefix": null,
13+
"selector-pseudo-class-no-unknown": null
1114
}
1215
}

src/components/CodeBox/index.module.scss

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
@import './light.module.scss';
1+
@import "./light.module.scss";
22

3-
%baseStyles {
3+
%base-styles {
44
border-radius: 0.3rem;
5-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
5+
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
66
font-size: 1em;
77

88
-webkit-hyphens: none;
@@ -25,15 +25,15 @@
2525
}
2626

2727
.code {
28-
@extend %baseStyles;
28+
@extend %base-styles;
2929
font-weight: var(--font-weight-light);
3030
padding: 0 6px;
3131

3232
white-space: break-spaces;
3333
}
3434

3535
.pre {
36-
@extend %baseStyles;
36+
@extend %base-styles;
3737

3838
padding: 0 !important;
3939

@@ -54,7 +54,7 @@
5454

5555
span {
5656
background-color: var(--black4);
57-
border-radius: 0 0 0.3rem 0;
57+
border-radius: 0 0 0.3rem;
5858
color: var(--black9);
5959
}
6060

@@ -77,7 +77,7 @@
7777

7878
:global(.light) {
7979
.pre {
80-
@include lightStyles;
80+
@include light-styles;
8181
}
8282

8383
.code {

src/components/CodeBox/index.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const CodeBox = ({ children: { props } }: Props): JSX.Element => {
2323
const [parsedCode, setParsedCode] = useState('');
2424
const [copied, copyText] = useCopyToClipboard();
2525

26-
// eslint-disable-next-line react/prop-types
2726
const className = props.className || 'text';
2827

2928
// Language Matches in class
@@ -45,7 +44,6 @@ const CodeBox = ({ children: { props } }: Props): JSX.Element => {
4544
setParsedCode(
4645
highlight(stringCode, prismLanguage, language)
4746
);
48-
// eslint-disable-next-line react-hooks/exhaustive-deps
4947
}, []);
5048

5149
return (
@@ -58,7 +56,6 @@ const CodeBox = ({ children: { props } }: Props): JSX.Element => {
5856
</div>
5957
<div
6058
className={styles.content}
61-
// eslint-disable-next-line react/no-danger
6259
dangerouslySetInnerHTML={{ __html: parsedCode }}
6360
/>
6461
</pre>
+64-63
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,77 @@
1-
@mixin lightStyles {
2-
background: var(--black2);
3-
color: black;
4-
5-
:global .token {
6-
&.comment,
7-
&.prolog,
8-
&.doctype,
9-
&.cdata {
1+
@mixin light-styles {
2+
background: var(--black2);
3+
color: black;
4+
5+
:global .token {
6+
&.comment,
7+
&.prolog,
8+
&.doctype,
9+
&.cdata {
1010
color: slategray;
11-
}
12-
13-
&.namespace {
11+
}
12+
13+
&.namespace {
1414
opacity: 0.7;
15-
}
16-
17-
&.property,
18-
&.tag,
19-
&.boolean,
20-
&.number,
21-
&.constant,
22-
&.symbol,
23-
&.deleted {
15+
}
16+
17+
&.property,
18+
&.tag,
19+
&.boolean,
20+
&.number,
21+
&.constant,
22+
&.symbol,
23+
&.deleted {
2424
color: #905;
25-
}
26-
27-
&.selector,
28-
&.attr-name,
29-
&.char,
30-
&.builtin,
31-
&.inserted {
25+
}
26+
27+
&.selector,
28+
&.attr-name,
29+
&.char,
30+
&.builtin,
31+
&.inserted {
3232
color: #690;
33-
}
34-
35-
&.entity,
36-
&.url {
37-
background: hsla(0, 0%, 100%, 0.5);
33+
}
34+
35+
&.entity,
36+
&.url {
37+
background: hsla(0deg, 0%, 100%, 50%);
3838
color: #9a6e3a;
39-
}
40-
41-
&.atrule,
42-
&.attr-value,
43-
&.keyword {
39+
}
40+
41+
&.atrule,
42+
&.attr-value,
43+
&.keyword {
4444
color: #07a;
45-
}
46-
47-
&.function,
48-
&.class-name {
45+
}
46+
47+
&.function,
48+
&.class-name {
4949
color: #dd4a68;
50-
}
51-
52-
&.regex,
53-
&.important,
54-
&.variable {
50+
}
51+
52+
&.regex,
53+
&.important,
54+
&.variable {
5555
color: #e90;
56-
}
57-
58-
&.important,
59-
&.bold {
56+
}
57+
58+
&.important,
59+
&.bold {
6060
font-weight: var(--font-weight-vold);
61-
}
62-
&.italic {
61+
}
62+
63+
&.italic {
6364
font-style: italic;
64-
}
65-
66-
&.entity {
65+
}
66+
67+
&.entity {
6768
cursor: help;
68-
}
69-
70-
&.punctuation,
71-
&.operator,
72-
&.string {
69+
}
70+
71+
&.punctuation,
72+
&.operator,
73+
&.string {
7374
background-color: var(--black2);
74-
}
7575
}
76-
}
76+
}
77+
}

src/components/Layout/layout.scss

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ $secondary: #dadada;
1212
}
1313

1414
body {
15+
--black2: #e9edf0;
1516
--black4: #cbd4d9;
1617
--black9: #2c3437;
1718
--brand4: #c52158;
@@ -22,6 +23,7 @@ body {
2223
--color-fill-banner: #9992;
2324
--color-text-primary: var(--black9);
2425
--color-text-accent: var(--color-brand-primary);
26+
--font-weight-light: 300;
2527

2628
background-color: var(--bg);
2729

0 commit comments

Comments
 (0)