Skip to content

Commit 9647c0e

Browse files
committed
setup
0 parents  commit 9647c0e

Some content is hidden

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

49 files changed

+3067
-0
lines changed

.eslintrc.cjs

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/* eslint-env node */
2+
require('@rushstack/eslint-patch/modern-module-resolution')
3+
4+
module.exports = {
5+
root: true,
6+
extends: [
7+
'plugin:vue/vue3-recommended',
8+
'eslint:recommended',
9+
'@vue/eslint-config-typescript',
10+
],
11+
parserOptions: {
12+
ecmaVersion: 'latest',
13+
},
14+
rules: {
15+
// lines for vue eslint config
16+
'vue/max-attributes-per-line': [
17+
'error',
18+
{
19+
singleline: {
20+
max: 3,
21+
},
22+
multiline: {
23+
max: 1,
24+
},
25+
},
26+
],
27+
'vue/html-indent': ['error', 2],
28+
'no-multi-spaces': ['error'],
29+
30+
'vue/html-self-closing': [
31+
'error',
32+
{
33+
html: {
34+
void: 'always', // area , base , br , col , command , embed , hr , img , input , keygen , link , meta , param , source , track , wbr.
35+
normal: 'never', // p, h, div ...
36+
component: 'always', // custom components
37+
},
38+
},
39+
],
40+
41+
'vue/html-closing-bracket-spacing': [
42+
'error',
43+
{
44+
startTag: 'never',
45+
endTag: 'never',
46+
selfClosingTag: 'always',
47+
},
48+
],
49+
50+
'vue/html-closing-bracket-newline': [
51+
'error',
52+
{
53+
singleline: 'never',
54+
multiline: 'always',
55+
},
56+
],
57+
58+
// lines for simple eslint config
59+
'no-unused-vars': [
60+
'error',
61+
{
62+
args: 'none',
63+
},
64+
],
65+
semi: ['error', 'never'], // no ;
66+
quotes: ['error', 'single'], // no "
67+
indent: ['error', 2, { SwitchCase: 1 }],
68+
'no-multiple-empty-lines': [
69+
'error',
70+
{
71+
// limit empty lines
72+
max: 2,
73+
maxEOF: 0,
74+
},
75+
],
76+
'space-before-function-paren': ['error', 'always'], // space before "()"" in function
77+
'space-before-blocks': ['error', 'always'], // space before {}
78+
'space-in-parens': ['error', 'never'],
79+
'array-bracket-spacing': ['error', 'never'],
80+
// 'comma-dangle': ['error', 'never'],
81+
'max-params': ['error', 3],
82+
'padding-line-between-statements': [
83+
'error',
84+
{
85+
blankLine: 'always',
86+
prev: ['const', 'let', 'var'],
87+
next: '*',
88+
},
89+
{
90+
blankLine: 'any',
91+
prev: ['const', 'let', 'var'],
92+
next: ['const', 'let', 'var'],
93+
},
94+
{
95+
blankLine: 'always',
96+
prev: 'import',
97+
next: 'export',
98+
},
99+
{
100+
blankLine: 'always',
101+
prev: '*',
102+
next: ['throw', 'return', 'function', 'debugger'],
103+
},
104+
{
105+
blankLine: 'always',
106+
prev: 'debugger',
107+
next: '*',
108+
},
109+
{
110+
blankLine: 'always',
111+
prev: '*',
112+
next: 'multiline-block-like',
113+
},
114+
],
115+
'no-async-promise-executor': 0, // allows using an async function as a Promise executor.
116+
'no-undef': 'warn',
117+
'no-useless-catch': 'off', // TODO: research how to fix no-useless-catch
118+
},
119+
}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"tabWidth": 2,
3+
"semi": false,
4+
"singleQuote": true,
5+
"arrowParens": "always",
6+
"bracketSpacing": true
7+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3+
}

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# test-task-opt6
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) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
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 [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12+
13+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14+
15+
1. Disable the built-in TypeScript Extension
16+
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17+
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19+
20+
## Customize configuration
21+
22+
See [Vite Configuration Reference](https://vitejs.dev/config/).
23+
24+
## Project Setup
25+
26+
```sh
27+
yarn
28+
```
29+
30+
### Compile and Hot-Reload for Development
31+
32+
```sh
33+
yarn dev
34+
```
35+
36+
### Type-Check, Compile and Minify for Production
37+
38+
```sh
39+
yarn build
40+
```
41+
42+
### Lint with [ESLint](https://eslint.org/)
43+
44+
```sh
45+
yarn lint
46+
```

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

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="en">
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>

package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "test-task-opt6",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "run-p type-check build-only",
8+
"preview": "vite preview",
9+
"build-only": "vite build",
10+
"type-check": "vue-tsc --noEmit",
11+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
12+
"format": "prettier --write src/"
13+
},
14+
"dependencies": {
15+
"pinia": "^2.0.32",
16+
"vue": "^3.2.47",
17+
"vue-router": "^4.1.6"
18+
},
19+
"devDependencies": {
20+
"@rushstack/eslint-patch": "^1.2.0",
21+
"@types/node": "^18.14.2",
22+
"@vitejs/plugin-vue": "^4.0.0",
23+
"@vue/eslint-config-prettier": "^7.1.0",
24+
"@vue/eslint-config-typescript": "^11.0.2",
25+
"@vue/tsconfig": "^0.1.3",
26+
"eslint": "^8.34.0",
27+
"eslint-plugin-vue": "^9.9.0",
28+
"npm-run-all": "^4.1.5",
29+
"prettier": "^2.8.4",
30+
"sass": "^1.62.0",
31+
"typescript": "~4.8.4",
32+
"vite": "^4.1.4",
33+
"vite-svg-loader": "^4.0.0",
34+
"vue-tsc": "^1.2.0"
35+
}
36+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/fonts/myriad-pro/bold.ttf

122 KB
Binary file not shown.

public/fonts/myriad-pro/bold.woff

58.6 KB
Binary file not shown.

public/fonts/myriad-pro/bold.woff2

40.5 KB
Binary file not shown.

public/fonts/myriad-pro/regular.ttf

123 KB
Binary file not shown.

public/fonts/myriad-pro/regular.woff

58.7 KB
Binary file not shown.

public/fonts/myriad-pro/regular.woff2

40.5 KB
Binary file not shown.

public/fonts/myriad-pro/semibold.ttf

123 KB
Binary file not shown.

public/fonts/myriad-pro/semibold.woff

58.7 KB
Binary file not shown.
40.6 KB
Binary file not shown.

public/fonts/verdana/verdana.ttf

150 KB
Binary file not shown.

public/fonts/verdana/verdana.woff

87.6 KB
Binary file not shown.

public/fonts/verdana/verdana.woff2

68.4 KB
Binary file not shown.

src/App.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<script setup lang="ts">
2+
import { RouterLink, RouterView } from 'vue-router'
3+
</script>
4+
5+
<template>
6+
<header>
7+
<div class="wrapper">
8+
<HelloWorld msg="You did it!" />
9+
10+
<nav>
11+
<RouterLink to="/">
12+
Home
13+
</RouterLink>
14+
</nav>
15+
</div>
16+
</header>
17+
18+
<RouterView />
19+
</template>
20+
21+
<style scoped>
22+
</style>

src/assets/icons/icon_add_plus.svg

Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading

src/assets/icons/icon_menu_burger.svg

Lines changed: 13 additions & 0 deletions
Loading

src/assets/icons/icon_menu_dots.svg

Lines changed: 15 additions & 0 deletions
Loading

src/assets/icons/icon_settings.svg

Lines changed: 11 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)