Skip to content

Commit

Permalink
Merge branch 'main' into RoomList
Browse files Browse the repository at this point in the history
  • Loading branch information
shota973 authored Jun 15, 2024
2 parents a5140b1 + ce9e844 commit ff86953
Show file tree
Hide file tree
Showing 26 changed files with 1,305 additions and 112 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/lib/apis/generated
41 changes: 41 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
extends: [
// add more generic rulesets here, such as:
// 'eslint:recommended',
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
// 'plugin:vue/recommended' // Use this if you are using Vue.js 2.x.
],
plugins: ['@typescript-eslint'],
rules: {
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
'no-restricted-imports': [
'error',
{
name: '@/lib/apis/generated',
message: 'Please use @/lib/apis instead.',
},
],
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
},
],
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
pull_request:
branches: [main]

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci

lint:
needs: [package]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run lint

type-check:
needs: [package]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run type-check

build:
needs: [package]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ dist-ssr
*.njsproj
*.sln
*.sw?

src/lib/apis/generated
27 changes: 0 additions & 27 deletions eslint.config.js

This file was deleted.

131 changes: 131 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"lint": "eslint src",
"lint": "eslint src --ext .js,.ts,.vue",
"gen-api": "node ./scripts/gen-api.js",
"with-mock": "concurrently \"prism mock -p 3000 -d https://raw.githubusercontent.com/traP-jp/h24s_19_server/main/swagger.yaml\" \"vite\""
"with-mock": "concurrently \"prism mock -p 3000 -d https://raw.githubusercontent.com/traP-jp/h24s_19_server/main/swagger.yaml\" \"vite\"",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"pinia": "^2.1.7",
Expand All @@ -20,11 +21,17 @@
"@eslint/js": "^8.57.0",
"@openapitools/openapi-generator-cli": "^2.13.4",
"@stoplight/prism-cli": "^5.8.1",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@vitejs/plugin-vue": "^5.0.4",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-typescript": "^3.0.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.26.0",
"execa": "^9.2.0",
"prettier": "^3.3.2",
"ts-morph": "^22.0.0",
"typescript": "^5.4.5",
"typescript-eslint": "^7.13.0",
Expand Down
23 changes: 6 additions & 17 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ const count = ref(0)
<h1>{{ msg }}</h1>

<div class="card">
<button
type="button"
@click="count++"
>
count is {{ count }}
</button>
<button type="button" @click="count++">count is {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test HMR
Expand All @@ -24,22 +19,16 @@ const count = ref(0)

<p>
Check out
<a
href="https://vuejs.org/guide/quick-start.html#local"
target="_blank"
>create-vue</a>, the official Vue + Vite starter
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Install
<a
href="https://github.com/vuejs/language-tools"
target="_blank"
>Volar</a>
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
in your IDE for a better DX
</p>
<p class="read-the-docs">
Click on the Vite and Vue logos to learn more
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
</template>

<style scoped>
Expand Down
4 changes: 4 additions & 0 deletions src/lib/apis/generated/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
1 change: 1 addition & 0 deletions src/lib/apis/generated/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
Loading

0 comments on commit ff86953

Please sign in to comment.