Skip to content

Commit bdebfbc

Browse files
authored
Initial commit
0 parents  commit bdebfbc

17 files changed

+7314
-0
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
allow:
8+
- dependency-type: direct
9+
ignore:
10+
- dependency-name: '*'
11+
update-types: ['version-update:semver-major', 'version-update:semver-minor']
12+
commit-message:
13+
prefix: chore
14+
prefix-development: chore
15+
include: scope
16+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: '${{ secrets.GITHUB_TOKEN }}'
18+
- name: Approve a PR
19+
run: gh pr review --approve "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
- name: Enable auto-merge for Dependabot PRs
24+
run: gh pr merge --auto --squash "$PR_URL"
25+
env:
26+
PR_URL: ${{github.event.pull_request.html_url}}
27+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
workflow_dispatch:
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: pnpm/action-setup@v4
21+
with:
22+
version: 9
23+
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
registry-url: https://registry.npmjs.org
28+
cache: pnpm
29+
30+
- run: pnpm install
31+
32+
- run: pnpm build
33+
34+
- run: npm publish --access public
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
37+
38+
- run: npx changelogithub
39+
env:
40+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Desktop Services Store in Mac OS
2+
.DS_Store
3+
4+
# Folder where front-end packages are stored
5+
node_modules
6+
7+
# output dir
8+
dist
9+
coverage

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.vscode/extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"ms-vscode.vscode-typescript-next",
5+
"stringham.move-ts",
6+
"pmneo.tsimporter",
7+
"christian-kohler.path-intellisense",
8+
"streetsidesoftware.code-spell-checker",
9+
"vitest.explorer"
10+
]
11+
}

.vscode/settings.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"cSpell.words": [
3+
"antfu",
4+
"bumpp",
5+
"changelogithub",
6+
"commitlint",
7+
"preid",
8+
"unplugin"
9+
],
10+
// Disable the default formatter, use eslint instead
11+
"prettier.enable": false,
12+
"editor.formatOnSave": false,
13+
14+
// Auto fix
15+
"editor.codeActionsOnSave": {
16+
"source.fixAll.eslint": "explicit",
17+
"source.organizeImports": "never"
18+
},
19+
20+
// Silent the stylistic rules in you IDE, but still auto fix them
21+
"eslint.rules.customizations": [
22+
{ "rule": "style/*", "severity": "off", "fixable": true },
23+
{ "rule": "format/*", "severity": "off", "fixable": true },
24+
{ "rule": "*-indent", "severity": "off", "fixable": true },
25+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
26+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
27+
{ "rule": "*-order", "severity": "off", "fixable": true },
28+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
29+
{ "rule": "*-newline", "severity": "off", "fixable": true },
30+
{ "rule": "*quotes", "severity": "off", "fixable": true },
31+
{ "rule": "*semi", "severity": "off", "fixable": true }
32+
],
33+
34+
// Enable eslint for all supported languages
35+
"eslint.validate": [
36+
"javascript",
37+
"javascriptreact",
38+
"typescript",
39+
"typescriptreact",
40+
"vue",
41+
"html",
42+
"markdown",
43+
"json",
44+
"json5",
45+
"jsonc",
46+
"yaml",
47+
"toml",
48+
"xml",
49+
"gql",
50+
"graphql",
51+
"astro",
52+
"css",
53+
"less",
54+
"scss",
55+
"pcss",
56+
"postcss"
57+
]
58+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 liting
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# typescript-starter
2+
3+
A typescript project startup template
4+
5+
## Features
6+
7+
- code lint & format with [eslint](https://eslint.org/) and [@antfu/eslint-config](https://www.npmjs.com/package/@antfu/eslint-config)
8+
- commit lint with [husky](https://typicode.github.io/husky/) and [lint-staged](https://www.npmjs.com/package/lint-staged)
9+
- build with [vite](https://vite.dev/)
10+
- test by [vitest](https://vitest.dev/)
11+
- release with [bumpp](https://github.com/antfu-collective/bumpp)
12+
- auto publish by [github action](https://docs.github.com/en/actions)
13+
- [create your npm token](https://docs.npmjs.com/creating-and-viewing-access-tokens) and add to repository's secret
14+
15+
## Notice to modify
16+
17+
- README.md
18+
- LICENSE
19+
- package.json
20+
- name
21+
- description
22+
- author
23+
- license
24+
- keywords
25+
- bugs
26+
- homepage

bump.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'bumpp'
2+
3+
export default defineConfig({
4+
preid: 'beta',
5+
commit: true,
6+
tag: true,
7+
push: true,
8+
all: true,
9+
confirm: true,
10+
})

0 commit comments

Comments
 (0)