Skip to content

Commit ad9cf6d

Browse files
committed
feat: Updated vue library and template
1 parent f74fead commit ad9cf6d

78 files changed

Lines changed: 10370 additions & 8890 deletions

Some content is hidden

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

packages/vue-lib/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
end_of_line = lf
9+
max_line_length = 100

packages/vue-lib/.eslintrc.cjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/vue-lib/.gitattributes

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

packages/vue-lib/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ coverage
2626
*.njsproj
2727
*.sln
2828
*.sw?
29+
30+
*.tsbuildinfo

packages/vue-lib/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/vue-lib/.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/vue-lib/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# vue-lib
2+
3+
This template should help get you started developing with Vue 3 in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8+
9+
## Type Support for `.vue` Imports in TS
10+
11+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12+
13+
## Customize configuration
14+
15+
See [Vite Configuration Reference](https://vite.dev/config/).
16+
17+
## Project Setup
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
### Compile and Hot-Reload for Development
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
### Type-Check, Compile and Minify for Production
30+
31+
```sh
32+
pnpm build
33+
```
34+
35+
### Lint with [ESLint](https://eslint.org/)
36+
37+
```sh
38+
pnpm lint
39+
```

packages/vue-lib/eslint.config.ts

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import stylisticTs from "@stylistic/eslint-plugin";
2+
import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript";
3+
import { globalIgnores } from "eslint/config";
4+
import simpleImportSort from "eslint-plugin-simple-import-sort";
5+
import pluginVue from "eslint-plugin-vue";
6+
7+
/*
8+
* To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
9+
* import { configureVueProject } from '@vue/eslint-config-typescript'
10+
* configureVueProject({ scriptLangs: ['ts', 'tsx'] })
11+
* More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
12+
*/
13+
14+
export default defineConfigWithVueTs(
15+
{
16+
name: "app/files-to-lint",
17+
files: ["**/*.{ts,mts,tsx,vue}"]
18+
},
19+
20+
globalIgnores([
21+
"**/*.js",
22+
"**/*.cjs",
23+
"**/dist/**",
24+
"**/dist-ssr/**",
25+
"**/coverage/**"
26+
]),
27+
28+
{
29+
plugins: {
30+
"@stylistic/ts": stylisticTs
31+
}
32+
},
33+
pluginVue.configs["flat/essential"],
34+
vueTsConfigs.recommended,
35+
36+
stylisticTs.configs["disable-legacy"],
37+
{
38+
rules: {
39+
"@stylistic/ts/indent": [
40+
"error",
41+
2
42+
],
43+
"@stylistic/ts/quote-props": [
44+
"error",
45+
"as-needed"
46+
],
47+
"@stylistic/ts/block-spacing": [
48+
"error",
49+
"always"
50+
],
51+
"@stylistic/ts/object-curly-spacing": [
52+
"error",
53+
"always"
54+
],
55+
"@stylistic/ts/semi": [
56+
"error",
57+
"always"
58+
],
59+
"@stylistic/ts/quotes": [
60+
"error",
61+
"double"
62+
],
63+
"@stylistic/ts/comma-spacing": [
64+
"error",
65+
{ before: false,
66+
after: true }
67+
],
68+
"no-unused-vars": "off",
69+
"vue/block-lang": "off",
70+
"vue/multi-word-component-names": "off",
71+
"@typescript-eslint/no-unused-vars": [
72+
"error", // or "error"
73+
{
74+
argsIgnorePattern: "^_",
75+
varsIgnorePattern: "^_",
76+
caughtErrorsIgnorePattern: "^_"
77+
}
78+
],
79+
"max-lines": [
80+
"warn",
81+
{ max: 500,
82+
skipBlankLines: true,
83+
skipComments: true }
84+
],
85+
"max-lines-per-function": [
86+
"warn",
87+
{ max: 200,
88+
skipBlankLines: true,
89+
skipComments: true }
90+
]
91+
}
92+
},
93+
{
94+
plugins: {
95+
"simple-import-sort": simpleImportSort
96+
},
97+
rules: {
98+
"simple-import-sort/imports": "error",
99+
"simple-import-sort/exports": "error"
100+
}
101+
}
102+
);

packages/vue-lib/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)