Skip to content

Commit 59eb2c7

Browse files
committed
format
1 parent 752b8f0 commit 59eb2c7

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

.github/workflows/format.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 👔 Format
2+
3+
on:
4+
workflow_dispatch: null
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
format:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
- name: Setup node
17+
uses: actions/setup-node@v4
18+
- name: Install deps
19+
run: npm install -f
20+
- name: Format
21+
run: npm run eslint-fix
22+
- name: Commit
23+
run: |
24+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
25+
git config --local user.name "github-actions[bot]"
26+
27+
git add .
28+
if [ -z "$(git status --porcelain)" ]; then
29+
echo "no formatting changed"
30+
exit 0
31+
fi
32+
git commit -m "chore: format"
33+
git push
34+
echo "pushed formatting changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"css.validate": false,
1313
"typescript.tsdk": "node_modules/typescript/lib",
1414
"editor.codeActionsOnSave": {
15-
"source.fixAll.eslint": true,
15+
"source.fixAll.eslint": "explicit"
1616
},
1717
"vetur.validation.template": false
1818
}

tsconfig.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
"noFallthroughCasesInSwitch": true,
1616
"baseUrl": ".",
1717
"paths": {
18-
"*": ["typings/*"]
18+
"*": ["typings/*"],
1919
},
2020
"declaration": true,
2121
"esModuleInterop": true,
2222
"resolveJsonModule": true,
2323

24-
"skipLibCheck": true
24+
"skipLibCheck": true,
2525
},
2626
"include": [
2727
"src/**/*",
2828
"tests/src/**/*",
2929
"tools/**/*",
3030
"typings/**/*",
31-
"benchmark/**/*"
31+
"benchmark/**/*",
3232
],
33-
"exclude": ["lib/**/*"]
33+
"exclude": ["lib/**/*"],
3434
}

0 commit comments

Comments
 (0)