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