Skip to content

Commit 088388d

Browse files
committed
init: 初始化仓库
0 parents  commit 088388d

27 files changed

+5526
-0
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
end_of_line = lf
6+
insert_final_newline = true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/renovate.json5

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
extends: ['github>sxzz/renovate-config'],
3+
automerge: true,
4+
ignorePaths: ['.github/workflows/**/*'],
5+
}

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set node
20+
uses: actions/setup-node@v5
21+
with:
22+
node-version: lts/*
23+
# TODO: https://github.com/actions/setup-node/issues/1357
24+
package-manager-cache: false
25+
26+
- run: npx changelogithub
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/unit-test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/[email protected]
18+
19+
- name: Set node LTS
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
cache: pnpm
24+
25+
- name: Install
26+
run: pnpm install
27+
28+
- name: Build
29+
run: pnpm run build
30+
31+
- name: Lint
32+
run: pnpm run lint
33+
34+
- name: Typecheck
35+
run: pnpm run typecheck
36+
37+
- name: Test
38+
run: pnpm run test

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
coverage
14+
*.local
15+
16+
# Editor directories and files
17+
.idea
18+
*.suo
19+
*.ntvs*
20+
*.njsproj
21+
*.sln
22+
*.sw?

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmmirror.com/

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import baseConfig from '@sxzz/prettier-config'
2+
3+
/**
4+
* @type {import('prettier').Config}
5+
*/
6+
export default {
7+
...baseConfig,
8+
singleAttributePerLine: true,
9+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3+
}

.vscode/settings.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"explorer.fileNesting.enabled": true,
3+
"explorer.fileNesting.patterns": {
4+
"tsconfig.json": "tsconfig.*.json, env.d.ts",
5+
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
6+
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig"
7+
},
8+
9+
"files.autoSave": "onWindowChange",
10+
"files.eol": "\n",
11+
12+
"editor.defaultFormatter": "esbenp.prettier-vscode",
13+
"editor.formatOnSave": false,
14+
15+
// Auto fix
16+
"editor.codeActionsOnSave": {
17+
"source.fixAll.eslint": "explicit",
18+
"source.organizeImports": "never"
19+
},
20+
21+
// Silent the stylistic rules in you IDE, but still auto fix them
22+
"eslint.rules.customizations": [
23+
{ "rule": "style/*", "severity": "off", "fixable": true },
24+
{ "rule": "format/*", "severity": "off", "fixable": true },
25+
{ "rule": "*-indent", "severity": "off", "fixable": true },
26+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
27+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
28+
{ "rule": "*-order", "severity": "off", "fixable": true },
29+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
30+
{ "rule": "*-newline", "severity": "off", "fixable": true },
31+
{ "rule": "*quotes", "severity": "off", "fixable": true },
32+
{ "rule": "*semi", "severity": "off", "fixable": true }
33+
],
34+
35+
// Enable eslint for all supported languages
36+
"eslint.validate": [
37+
"javascript",
38+
"javascriptreact",
39+
"typescript",
40+
"typescriptreact",
41+
"vue",
42+
"html",
43+
"markdown",
44+
"json",
45+
"jsonc",
46+
"yaml",
47+
"toml",
48+
"xml",
49+
"gql",
50+
"graphql",
51+
"astro",
52+
"svelte",
53+
"css",
54+
"less",
55+
"scss",
56+
"pcss",
57+
"postcss"
58+
]
59+
}

0 commit comments

Comments
 (0)