ci: add CI script and VSCode settings

Signed-off-by: WaitSpring <me@waitspring.com>
这个提交包含在:
WaitSpring 2023-06-30 21:32:56 +08:00
父节点 d9da39d340
当前提交 b6514c0e9a
共有 4 个文件被更改,包括 94 次插入0 次删除

23
.github/dependabot.yml vendored 普通文件
查看文件

@ -0,0 +1,23 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
time: "08:15"
timezone: "Asia/Shanghai"
commit-message:
prefix: "npm"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "08:15"
timezone: "Asia/Shanghai"
commit-message:
prefix: "github-actions"

20
.github/workflows/dependency-review.yml vendored 普通文件
查看文件

@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3

10
.vscode/extensions.json vendored 普通文件
查看文件

@ -0,0 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"usernamehw.errorlens",
"yoavbls.pretty-ts-errors"
]
}

41
.vscode/settings.json vendored 普通文件
查看文件

@ -0,0 +1,41 @@
{
"diffEditor.codeLens": true,
"diffEditor.ignoreTrimWhitespace": false,
"editor.bracketPairColorization.independentColorPoolPerBracketType": true,
"editor.guides.bracketPairs": "active",
"editor.insertSpaces": false,
"editor.linkedEditing": true,
"editor.renderWhitespace": "all",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.enable": true,
"eslint.format.enable": true,
"prettier.enable": true,
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"css.format.spaceAroundSelectorSeparator": true,
"css.lint.unknownAtRules": "ignore",
"errorLens.editorHoverPartsEnabled": {
"buttonsEnabled": false
},
"errorLens.enableOnDiffView": true,
"stylelint.packageManager": "pnpm",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"package.json": ".babel*, .editorConfig, .eslint*, .git*, .hintrc, .mailmap, pnpm-lock.yaml, .prettier*, .stylelint*, commitlinterrc.json, jsconfig.json, tsconfig.json",
"readme*": "*.md"
}
}