Skip to content

Commit 83b9ac0

Browse files
authored
Merge pull request #1185 from db-ux-design-system/refactor-running-prettier
refactor: running prettier
2 parents 3031e58 + e1405c8 commit 83b9ac0

File tree

15 files changed

+102
-80
lines changed

15 files changed

+102
-80
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ updates:
1616
ignore:
1717
# We currently need to ignore eslint@v9
1818
- dependency-name: "eslint"
19-
update-types: [ "version-update:semver-major" ]
19+
update-types: ["version-update:semver-major"]

scripts/cleanup-gh-pages.js

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,56 @@
11
/*
22
* Fetches all branches and deletes all review-branches in github pages
33
*/
4-
import FS from 'node:fs';
4+
import FS from "node:fs";
55

6-
const TAG = 'cleanup-gh-pages:';
6+
const TAG = "cleanup-gh-pages:";
77

88
const removeOldFromPath = (isTag, data) => {
9-
const path = `public/${isTag ? 'version' : 'review'}`;
10-
if (
11-
FS.existsSync(path) &&
12-
data?.filter((branch) => branch.name).length > 0
13-
) {
14-
const dirsToDelete = FS.readdirSync(path)
15-
.filter((file) => !data.find((branch) => branch.name === file))
16-
// Let's not clean up specific folders
17-
.filter((file) => !['main', 'latest'].includes(file));
18-
if (dirsToDelete?.length > 0) {
19-
console.log(
20-
TAG,
21-
`Start removing ${isTag ? 'tags' : 'branches'} from gh-pages`
22-
);
23-
console.log(TAG, dirsToDelete);
24-
for (const dir of dirsToDelete) {
25-
FS.rmSync(`${path}/${dir}`, {
26-
recursive: true,
27-
force: true
28-
});
29-
console.log(TAG, `deleted ${isTag ? 'tag' : 'branch'} ${dir}`);
30-
}
31-
32-
return true;
33-
}
34-
35-
console.log(TAG, `All ${isTag ? 'tags' : 'branches'} are up to date`);
36-
}
37-
38-
return false;
9+
const path = `public/${isTag ? "version" : "review"}`;
10+
if (FS.existsSync(path) && data?.filter((branch) => branch.name).length > 0) {
11+
const dirsToDelete = FS.readdirSync(path)
12+
.filter((file) => !data.find((branch) => branch.name === file))
13+
// Let's not clean up specific folders
14+
.filter((file) => !["main", "latest"].includes(file));
15+
if (dirsToDelete?.length > 0) {
16+
console.log(
17+
TAG,
18+
`Start removing ${isTag ? "tags" : "branches"} from gh-pages`,
19+
);
20+
console.log(TAG, dirsToDelete);
21+
for (const dir of dirsToDelete) {
22+
FS.rmSync(`${path}/${dir}`, {
23+
recursive: true,
24+
force: true,
25+
});
26+
console.log(TAG, `deleted ${isTag ? "tag" : "branch"} ${dir}`);
27+
}
28+
29+
return true;
30+
}
31+
32+
console.log(TAG, `All ${isTag ? "tags" : "branches"} are up to date`);
33+
}
34+
35+
return false;
3936
};
4037

4138
const cleanUpPages = async ({ github, context }) => {
42-
const { repo, owner } = context.repo;
43-
const branches = await github.rest.repos.listBranches({
44-
owner,
45-
repo
46-
});
47-
const tags = await github.rest.repos.listTags({
48-
owner,
49-
repo
50-
});
51-
52-
return {
53-
deploy:
54-
removeOldFromPath(false, branches.data) ||
55-
removeOldFromPath(true, tags.data)
56-
};
39+
const { repo, owner } = context.repo;
40+
const branches = await github.rest.repos.listBranches({
41+
owner,
42+
repo,
43+
});
44+
const tags = await github.rest.repos.listTags({
45+
owner,
46+
repo,
47+
});
48+
49+
return {
50+
deploy:
51+
removeOldFromPath(false, branches.data) ||
52+
removeOldFromPath(true, tags.data),
53+
};
5754
};
5855

5956
export default cleanUpPages;

src/components/Customization/LogoUpload/logo-upload.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ const LogoUpload = memo(() => {
1313
<div className="flex flex-col gap-fix-md">
1414
<h5>{t("logo")}</h5>
1515
<div className="flex gap-fix-md">
16-
<div
17-
className="flex flex-col gap-fix-md p-fix-sm"
18-
data-mode="light"
19-
>
16+
<div className="flex flex-col gap-fix-md p-fix-sm" data-mode="light">
2017
<DBInfotext icon="sun">Light</DBInfotext>
2118
<img
2219
className="h-siz-md mx-auto"
@@ -44,10 +41,7 @@ const LogoUpload = memo(() => {
4441
/>
4542
</div>
4643
<DBDivider margin="none" variant="vertical" />
47-
<div
48-
className="flex flex-col gap-fix-md p-fix-sm"
49-
data-mode="dark"
50-
>
44+
<div className="flex flex-col gap-fix-md p-fix-sm" data-mode="dark">
5145
<DBInfotext icon="moon">Dark</DBInfotext>
5246
<img
5347
className="h-siz-md mx-auto"

src/components/Customization/Preview/ColorPalettes/index.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414

1515
.db-popover-content {
1616
top: calc(
17-
-1 * (#{variables.$db-spacing-fixed-sm} + #{variables.$db-sizing-lg} *
18-
var(--color-index, 1) + var(--color-index, 1) * #{variables.$db-spacing-fixed-2xs})
17+
-1 *
18+
(
19+
#{variables.$db-spacing-fixed-sm} + #{variables.$db-sizing-lg} *
20+
var(--color-index, 1) + var(--color-index, 1) *
21+
#{variables.$db-spacing-fixed-2xs}
22+
)
1923
) !important;
2024
}
2125

src/components/DefaultPage/default-page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { DBButton, DBHeader, DBPage, DBTooltip } from "@db-ux/react-core-components";
1+
import {
2+
DBButton,
3+
DBHeader,
4+
DBPage,
5+
DBTooltip,
6+
} from "@db-ux/react-core-components";
27
import { useThemeBuilderStore } from "../../store";
38
import { DefaultPagePropsType } from "./data.ts";
49
import { PropsWithChildren, useState } from "react";

src/components/Landing/ThemeSelect/theme-select.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { DBCard, DBIcon, DBSection, DBTooltip } from "@db-ux/react-core-components";
1+
import {
2+
DBCard,
3+
DBIcon,
4+
DBSection,
5+
DBTooltip,
6+
} from "@db-ux/react-core-components";
27
import { useThemeBuilderStore } from "../../../store";
38
import { Link } from "react-router-dom";
49
import Demo from "../../../pages/Demo";

src/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
@use "@db-ux/core-foundations/build/styles/screen-sizes";
44
@use "@db-ux/core-components/build/styles/internal/db-puls" as puls;
55

6-
76
[data-focus="true"] {
87
@extend %db-puls;
98
@include puls.set-db-puls-vertical();

src/pages/Demo/demo.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ const Demo = ({ linkToDemo, density }: DemoPropsType) => {
2626
>
2727
<div className="flex flex-col md:flex-row h-full">
2828
<Sidenav />
29-
<div className="flex flex-col gap-fix-md py-fix-md px-res-sm
30-
db-bg-color-basic-level-2 w-full h-full overflow-y-auto">
29+
<div
30+
className="flex flex-col gap-fix-md py-fix-md px-res-sm
31+
db-bg-color-basic-level-2 w-full h-full overflow-y-auto"
32+
>
3133
<h1>{t("Dashboard")}</h1>
3234
<div className="demo-dashboard grid gap-fix-md h-full">
3335
<DBCard

src/pages/Playground/index.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ $selected-outline-height: 3px;
2222
.drop-container,
2323
.drag-container {
2424
--db-current-icon-color: #{colors.$db-adaptive-on-bg-basic-emphasis-100-default};
25-
background-image: linear-gradient(
25+
background-image:
26+
linear-gradient(
2627
#{colors.$db-adaptive-bg-basic-level-1-default},
2728
#{colors.$db-adaptive-bg-basic-level-1-default}
2829
),

src/utils/generate-colors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defaultLuminances, HeisslufType } from "./data.ts";
22
import { Hsluv } from "hsluv";
33
import chroma from "chroma-js";
4-
import {FALLBACK_COLOR} from "../constants.ts";
4+
import { FALLBACK_COLOR } from "../constants.ts";
55

66
export const getValidPaletteColorAsHex = (
77
brandColors: HeisslufType[],

0 commit comments

Comments
 (0)