Skip to content

Commit f46278a

Browse files
committed
feat: init
0 parents  commit f46278a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+7281
-0
lines changed

.commitlintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'type-enum': [
5+
2,
6+
'always',
7+
['init', 'build', 'ci', 'chore', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'],
8+
],
9+
},
10+
};

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*] # 表示所有文件都要遵循
7+
indent_style = space # 缩进风格,可选配置有space和tab
8+
indent_size = 2 # 缩进大小
9+
end_of_line = lf # 换行符,可选配置有lf、cr和crlf
10+
charset = utf-8 # 编码格式,通常都是选utf-8
11+
trim_trailing_whitespace = true # 去除多余的空格
12+
insert_final_newline = true # 在尾部插入一行
13+
14+
[*.md] # 表示仅 md 文件适用
15+
insert_final_newline = false # 在尾部插入一行
16+
trim_trailing_whitespace = false # 去除多余的空格

.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
VITE_API_BASEURL = /api
2+
3+
VITE_BASE = /
4+
5+
VITE_APP_TITLE = Vite Vue3 Template
6+
7+
VITE_APP_DESCRIPTION = A zero-config Vue3 template includes Vite3、Vue3 and TypeScript
8+
9+
VITE_APP_API_BASE_URL = http://jsonplaceholder.typicode.com/

.env.development

Whitespace-only changes.

.env.production

Whitespace-only changes.

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
presets
7+
*.d.ts

.eslintrc-auto-import.json

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
{
2+
"globals": {
3+
"acceptHMRUpdate": true,
4+
"asyncComputed": true,
5+
"autoResetRef": true,
6+
"biSyncRef": true,
7+
"computed": true,
8+
"computedInject": true,
9+
"controlledComputed": true,
10+
"controlledRef": true,
11+
"createApp": true,
12+
"createEventHook": true,
13+
"createGlobalState": true,
14+
"createPinia": true,
15+
"createReactiveFn": true,
16+
"createSharedComposable": true,
17+
"createUnrefFn": true,
18+
"customRef": true,
19+
"debouncedRef": true,
20+
"debouncedWatch": true,
21+
"defineAsyncComponent": true,
22+
"defineComponent": true,
23+
"defineStore": true,
24+
"eagerComputed": true,
25+
"effectScope": true,
26+
"EffectScope": true,
27+
"ElMessage": true,
28+
"ElNotification": true,
29+
"extendRef": true,
30+
"getActivePinia": true,
31+
"getCurrentInstance": true,
32+
"getCurrentScope": true,
33+
"h": true,
34+
"ignorableWatch": true,
35+
"inject": true,
36+
"isDefined": true,
37+
"isReadonly": true,
38+
"isRef": true,
39+
"makeDestructurable": true,
40+
"mapActions": true,
41+
"mapGetters": true,
42+
"mapState": true,
43+
"mapStores": true,
44+
"mapWritableState": true,
45+
"markRaw": true,
46+
"nextTick": true,
47+
"onActivated": true,
48+
"onBeforeMount": true,
49+
"onBeforeUnmount": true,
50+
"onBeforeUpdate": true,
51+
"onClickOutside": true,
52+
"onDeactivated": true,
53+
"onErrorCaptured": true,
54+
"onKeyStroke": true,
55+
"onLongPress": true,
56+
"onMounted": true,
57+
"onRenderTracked": true,
58+
"onRenderTriggered": true,
59+
"onScopeDispose": true,
60+
"onServerPrefetch": true,
61+
"onStartTyping": true,
62+
"onUnmounted": true,
63+
"onUpdated": true,
64+
"pausableWatch": true,
65+
"provide": true,
66+
"reactify": true,
67+
"reactifyObject": true,
68+
"reactive": true,
69+
"reactiveComputed": true,
70+
"reactiveOmit": true,
71+
"reactivePick": true,
72+
"readonly": true,
73+
"ref": true,
74+
"refDefault": true,
75+
"resolveComponent": true,
76+
"setActivePinia": true,
77+
"setMapStoreSuffix": true,
78+
"shallowReactive": true,
79+
"shallowReadonly": true,
80+
"shallowRef": true,
81+
"storeToRefs": true,
82+
"syncRef": true,
83+
"templateRef": true,
84+
"throttledRef": true,
85+
"throttledWatch": true,
86+
"toRaw": true,
87+
"toReactive": true,
88+
"toRef": true,
89+
"toRefs": true,
90+
"triggerRef": true,
91+
"tryOnBeforeUnmount": true,
92+
"tryOnMounted": true,
93+
"tryOnScopeDispose": true,
94+
"tryOnUnmounted": true,
95+
"unref": true,
96+
"unrefElement": true,
97+
"until": true,
98+
"useActiveElement": true,
99+
"useAsyncQueue": true,
100+
"useAsyncState": true,
101+
"useAttrs": true,
102+
"useBase64": true,
103+
"useBattery": true,
104+
"useBreakpoints": true,
105+
"useBroadcastChannel": true,
106+
"useBrowserLocation": true,
107+
"useCached": true,
108+
"useClamp": true,
109+
"useClipboard": true,
110+
"useColorMode": true,
111+
"useConfirmDialog": true,
112+
"useCounter": true,
113+
"useCssModule": true,
114+
"useCssVar": true,
115+
"useCssVars": true,
116+
"useCycleList": true,
117+
"useDark": true,
118+
"useDebounce": true,
119+
"useDebouncedRefHistory": true,
120+
"useDebounceFn": true,
121+
"useDeviceMotion": true,
122+
"useDeviceOrientation": true,
123+
"useDevicePixelRatio": true,
124+
"useDevicesList": true,
125+
"useDisplayMedia": true,
126+
"useDocumentVisibility": true,
127+
"useDraggable": true,
128+
"useElementBounding": true,
129+
"useElementByPoint": true,
130+
"useElementHover": true,
131+
"useElementSize": true,
132+
"useElementVisibility": true,
133+
"useEventBus": true,
134+
"useEventListener": true,
135+
"useEventSource": true,
136+
"useEyeDropper": true,
137+
"useFavicon": true,
138+
"useFetch": true,
139+
"useFocus": true,
140+
"useFocusWithin": true,
141+
"useFps": true,
142+
"useFullscreen": true,
143+
"useGeolocation": true,
144+
"useI18n": true,
145+
"useIdle": true,
146+
"useInfiniteScroll": true,
147+
"useIntersectionObserver": true,
148+
"useInterval": true,
149+
"useIntervalFn": true,
150+
"useKeyModifier": true,
151+
"useLastChanged": true,
152+
"useLocalStorage": true,
153+
"useMagicKeys": true,
154+
"useManualRefHistory": true,
155+
"useMediaControls": true,
156+
"useMediaQuery": true,
157+
"useMemoize": true,
158+
"useMemory": true,
159+
"useMounted": true,
160+
"useMouse": true,
161+
"useMouseInElement": true,
162+
"useMousePressed": true,
163+
"useMutationObserver": true,
164+
"useNavigatorLanguage": true,
165+
"useNetwork": true,
166+
"useNow": true,
167+
"useOffsetPagination": true,
168+
"useOnline": true,
169+
"usePageLeave": true,
170+
"useParallax": true,
171+
"usePermission": true,
172+
"usePointer": true,
173+
"usePointerSwipe": true,
174+
"usePreferredColorScheme": true,
175+
"usePreferredDark": true,
176+
"usePreferredLanguages": true,
177+
"useRafFn": true,
178+
"useRefHistory": true,
179+
"useResizeObserver": true,
180+
"useRoute": true,
181+
"useRouter": true,
182+
"useScreenSafeArea": true,
183+
"useScriptTag": true,
184+
"useScroll": true,
185+
"useScrollLock": true,
186+
"useSessionStorage": true,
187+
"useShare": true,
188+
"useSlots": true,
189+
"useSpeechRecognition": true,
190+
"useSpeechSynthesis": true,
191+
"useStorage": true,
192+
"useStorageAsync": true,
193+
"useStyleTag": true,
194+
"useSwipe": true,
195+
"useTemplateRefsList": true,
196+
"useTextSelection": true,
197+
"useThrottle": true,
198+
"useThrottledRefHistory": true,
199+
"useThrottleFn": true,
200+
"useTimeAgo": true,
201+
"useTimeout": true,
202+
"useTimeoutFn": true,
203+
"useTimestamp": true,
204+
"useTitle": true,
205+
"useToggle": true,
206+
"useTransition": true,
207+
"useUrlSearchParams": true,
208+
"useUserMedia": true,
209+
"useVibrate": true,
210+
"useVirtualList": true,
211+
"useVModel": true,
212+
"useVModels": true,
213+
"useWakeLock": true,
214+
"useWebNotification": true,
215+
"useWebSocket": true,
216+
"useWebWorker": true,
217+
"useWebWorkerFn": true,
218+
"useWindowFocus": true,
219+
"useWindowScroll": true,
220+
"useWindowSize": true,
221+
"watch": true,
222+
"watchAtMost": true,
223+
"watchEffect": true,
224+
"watchOnce": true,
225+
"watchWithFilter": true,
226+
"whenever": true
227+
}
228+
}

.eslintrc.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
globals: {
8+
defineEmits: true,
9+
document: true,
10+
localStorage: true,
11+
GLOBAL_VAR: true,
12+
window: true,
13+
defineProps: true,
14+
defineExpose: true,
15+
withDefaults: true,
16+
},
17+
extends: [
18+
'./.eslintrc-auto-import.json',
19+
'airbnb-base',
20+
'plugin:@typescript-eslint/recommended',
21+
'plugin:vue/vue3-recommended',
22+
'plugin:prettier/recommended', // 添加 prettier 插件
23+
],
24+
parserOptions: {
25+
ecmaVersion: 'latest',
26+
parser: '@typescript-eslint/parser',
27+
sourceType: 'module',
28+
},
29+
plugins: ['vue', '@typescript-eslint', 'import'],
30+
rules: {
31+
'no-console': 'off',
32+
'import/no-unresolved': 'off',
33+
'import/extensions': 'off',
34+
'import/no-extraneous-dependencies': 'off',
35+
},
36+
};

.gitattributes

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

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local

.husky/.gitignore

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

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
*.d.ts

.vscode/extensions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"johnsoncodehk.volar",
4+
"lokalise.i18n-ally",
5+
"antfu.iconify",
6+
"dbaeumer.vscode-eslint",
7+
"esbenp.prettier-vscode",
8+
"EditorConfig.EditorConfig",
9+
"voorjaar.windicss-intellisense",
10+
"csstools.postcss",
11+
"MariusAlchimavicius.json-to-ts"
12+
]
13+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll.eslint": true,
5+
},
6+
"editor.formatOnSave": true,
7+
"i18n-ally.localesPaths": [
8+
"locales"
9+
],
10+
"scss.lint.unknownAtRules": "ignore"
11+
}

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) 2023 muyun
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.

0 commit comments

Comments
 (0)