Skip to content

Commit 6ef881e

Browse files
committed
Merge branch 'dependabot-npm_and_yarn-prettier-3.5.3' of https://github.com/db-ui/core into dependabot-npm_and_yarn-prettier-3.5.3
2 parents 2390183 + a429bb7 commit 6ef881e

File tree

6 files changed

+2018
-1945
lines changed

6 files changed

+2018
-1945
lines changed

.config/.lintstagedrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"*.md": "markdownlint -c .markdown-lint.yml",
33
".stylelintrc.*": "stylelint --validate --allow-empty-input",
44
"stylelint.config.*": "stylelint --validate --allow-empty-input",
5-
"*.{css,scss}": "stylelint --fix --no-validate",
5+
"*.{css,scss}": "stylelint --fix --allow-empty-input --no-validate",
66
"*.{js,ts,tsx,jsx,mjs,cjs}": "xo --fix"
77
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Auto-Format with Prettier on PR for "self-healing" PRs
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
with:
13+
ref: ${{github.event.pull_request.head.ref}}
14+
fetch-depth: 0
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
21+
- name: Install dependencies
22+
run: |
23+
npm ci
24+
25+
- name: Check if Prettier update PR
26+
id: check_pr
27+
run: |
28+
echo "PR title: ${{ github.event.pull_request.title }}"
29+
if [[ "${{ github.event.pull_request.title }}" =~ "bump prettier from" ]]; then
30+
echo "Prettier update detected."
31+
echo "prettier_update=true" >> $GITHUB_ENV
32+
else
33+
echo "No Prettier update detected."
34+
echo "prettier_update=false" >> $GITHUB_ENV
35+
fi
36+
37+
- name: Run Prettier to format the code
38+
if: env.prettier_update == 'true'
39+
run: |
40+
npx --no prettier . --write
41+
42+
- name: Commit changes if formatting is done
43+
if: env.prettier_update == 'true'
44+
run: |
45+
git config --global user.name 'github-actions[bot]'
46+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
47+
48+
git add .
49+
git commit --all -m "Auto-format codebase with Prettier" || echo "No changes to commit"
50+
git push origin HEAD:${{ github.head_ref }} # Push back to the same PR branch

.github/workflows/pull-request.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
auto-merge:
1616
uses: ./.github/workflows/99-auto-merge.yml
1717

18+
dependabot-prettier-self-healing:
19+
uses: ./.github/workflows/99-auto-format-dependabot-prettier-updates.yml
20+
1821
codeql:
1922
uses: ./.github/workflows/99-codeql-analysis.yml
2023

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@
1919

2020
<!-- ![Pipeline status](https://github.com/db-ui/core/badges/main/pipeline.svg?style=flat) -->
2121

22+
<!-- markdownlint-disable MD033 -->
23+
2224
> [!IMPORTANT]
23-
> We've released the new stable version of the [DB UX Design System v3](https://github.com/db-ux-design-system/core-web), which is the successor of this generation of DB Design Systems.
25+
> We've released the new stable version of the [DB UX Design System v3](https://github.com/db-ux-design-system/core-web), which is the successor to this generation of DB Design Systems.
2426
> Especially for new projects, we strongly recommend building on [DB UX Design System v3](https://github.com/db-ux-design-system/core-web).
25-
> The new version has some great benefits and optimisations, especially in terms of accessibility testing, further and better framework support and ongoing development.
27+
> The new version has some great benefits and optimisations, especially in terms of accessibility testing, further and better framework support and ongoing development.<br>
28+
> Please note that we won't be providing any new features from now on, only bug fixes until EOL at the end of 2026.
29+
30+
<!-- markdownlint-enable MD033 -->
2631

2732
> [!WARNING]
2833
> We've tried a [quick migration to newer SCSS syntax like e.g. `@use` instead of the nowadays deprecated `@import`](https://github.com/db-ui/core/issues/994), but this seems to be more complicated than expected.

0 commit comments

Comments
 (0)