mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
action: use autofix.ci to format code
opt: ignore clang-format on style/js files action: prettier ignore file
This commit is contained in:
parent
119a5ccb6c
commit
bfba6e1f67
|
@ -1,4 +1,4 @@
|
|||
name: "auto clang-format code"
|
||||
name: autofix.ci
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -12,7 +12,8 @@ on:
|
|||
- "howto/**"
|
||||
- "*.md"
|
||||
- "locale/**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -42,3 +43,27 @@ jobs:
|
|||
with:
|
||||
default_author: github_actor
|
||||
message: 🎨 apply clang-format changes
|
||||
|
||||
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
|
||||
|
||||
|
||||
css-js-html-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- run: |
|
||||
npm ci
|
||||
- run: npx prettier --write src/stylesheets src/scripts/gd-*.js
|
||||
# Optimize all PNGs with https://pngquant.org/
|
||||
# - run: sudo apt-get update && sudo apt-get install -y pngquant
|
||||
# - name: Run pngquant
|
||||
# run: |
|
||||
# shopt -s globstar
|
||||
# pngquant -f --ext .png --skip-if-larger -- **/*.png
|
||||
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -55,4 +55,6 @@ goldendict.vcxproj.filters
|
|||
GoldenDict_resource.rc
|
||||
|
||||
*.TMP
|
||||
*.orig
|
||||
*.orig
|
||||
|
||||
node_modules
|
2
.prettierignore
Normal file
2
.prettierignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
**/.clang-format
|
||||
|
1
.prettierrc.json
Normal file
1
.prettierrc.json
Normal file
|
@ -0,0 +1 @@
|
|||
|
24
package-lock.json
generated
Normal file
24
package-lock.json
generated
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "goldendict",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"prettier": "3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.0.0.tgz",
|
||||
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
5
package.json
Normal file
5
package.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"prettier": "3.0.0"
|
||||
}
|
||||
}
|
4
src/scripts/.clang-format
Normal file
4
src/scripts/.clang-format
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
DisableFormat: true
|
||||
SortIncludes: Never
|
||||
...
|
4
src/stylesheets/.clang-format
Normal file
4
src/stylesheets/.clang-format
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
DisableFormat: true
|
||||
SortIncludes: Never
|
||||
...
|
Loading…
Reference in a new issue