Update workflow
This commit is contained in:
6
.github/workflows/workflow.yml
vendored
6
.github/workflows/workflow.yml
vendored
@@ -72,6 +72,7 @@ jobs:
|
||||
name: Format code
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, analyze ]
|
||||
if: github.event_name == 'push' && github.head_ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
@@ -81,15 +82,18 @@ jobs:
|
||||
run: |
|
||||
curl -fsSL https://dprint.dev/install.sh | sh
|
||||
echo "$HOME/.dprint/bin" >> $GITHUB_PATH
|
||||
- name: Checkout master
|
||||
run: git checkout master
|
||||
- name: Format code
|
||||
run: npm run fmt
|
||||
- name: Publish formatted code
|
||||
if: false #github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
set +e
|
||||
git status
|
||||
# git add --update
|
||||
# git commit -m "Auto-format code"
|
||||
# git push
|
||||
set -e
|
||||
|
||||
# Update plugins and template indexes, along with README.md
|
||||
update-indexes:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"index": "node .github/index.mjs",
|
||||
"quickstart": "node .github/quickstart/index.mjs",
|
||||
"preview": "node .github/preview.mjs",
|
||||
"linter": "eslint source/**/*.mjs",
|
||||
"linter": "eslint source/**/*.mjs --quiet",
|
||||
"dev": "nodemon source/app/web/index.mjs -e mjs,css,ejs,json",
|
||||
"postinstall": "node node_modules/puppeteer/install.js",
|
||||
"fmt": "dprint fmt --config .github/config/dprint.json && npx eslint source/**/*.mjs --fix"
|
||||
|
||||
@@ -126,9 +126,9 @@ rules:
|
||||
func-call-spacing: error
|
||||
arrow-spacing: error
|
||||
generator-star-spacing: error
|
||||
object-curly-spacing: [error, never]
|
||||
object-curly-spacing: [warn, never]
|
||||
rest-spread-spacing: error
|
||||
key-spacing: [error, {afterColon: false}]
|
||||
key-spacing: [warn, {afterColon: false}]
|
||||
computed-property-spacing: error
|
||||
array-bracket-spacing: [error, never]
|
||||
no-whitespace-before-property: error
|
||||
|
||||
Reference in New Issue
Block a user