Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from guanguans:master #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.{vue,js,scss}]
indent_size = 2
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml,xml,xml.dist}]
indent_size = 2
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ updates:
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 10
31 changes: 31 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: dependabot-auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
24 changes: 16 additions & 8 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
name: lint markdown

on: [push, pull_request]
on: [workflow_dispatch, push, pull_request]

jobs:
lint-markdown:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: lint-md-github-action
uses: lint-md/[email protected]
with:
configFile: .lintmdrc
failOnWarnings: false
files: ./ ./.github/
- name: Set node version
uses: actions/setup-node@v4

- name: Install lint-md
run: npm install @lint-md/cli -g

- name: Install zhlint
run: npm install zhlint -g

- name: Lint markdown
run: lint-md 'README.md' --config=.lintmdrc --threads

# - name: Lint zh_CN
# run: zhlint 'README.md' --config=.zhlintrc
28 changes: 22 additions & 6 deletions .lintmdrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
{
"excludeFiles": [
"src/",
"tests/",
"vendor/"
"./.build/**",
"./.github/**",
"./node_modules/**",
"./vendor/**",
"./vendor-bin/**"
],
"rules": {
"no-empty-code": 1,
"space-around-alphabet": 2,
"space-around-number": 2,
"no-empty-code-lang": 2,
"no-empty-url": 2,
"no-empty-list": 2,
"no-empty-code": 2,
"no-empty-inline-code": 2,
"no-empty-blockquote": 2,
"no-special-characters": 2,
"use-standard-ellipsis": 2,
"no-fullwidth-number": 2,
"no-space-in-link": 2,
"no-multiple-space-blockquote": 2,
"correct-title-trailing-punctuation": 2,
"no-space-in-inline-code": 2,
"no-long-code": [
2,
{
"length": 256,
"length": 120,
"exclude": [
"dot"
]
}
]
}
}
}
6 changes: 6 additions & 0 deletions .zhlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.build
/.github
/node_modules
/vendor
/vendor-bin
/传说部分/地方传说/鸠龙岗的来历.md
7 changes: 7 additions & 0 deletions .zhlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"preset": "default",
"rules": {
"noSinglePair": false,
"noSpaceBetweenFullwidthContent": false
}
}
Loading