Skip to content
This repository was archived by the owner on May 25, 2024. It is now read-only.

Commit 916f6d1

Browse files
authored
chore: ビルドツールをVue CLI -> Viteに変更 (#126)
* chore: プロジェクト作成をVue CLI -> create-vueに変更 * chore: ESLint設定をcreate-vueに合わせる * feature: App.vueをscript setupで書き直す * chore: VSCodeでの保存時にESLintを実行する * chore: core-jsを削除 * chore: .eslintrc.js -> .eslintrc.cjs に変更 * chore: babelは不要になったので設定ファイルを消す
1 parent 6239063 commit 916f6d1

11 files changed

+5063
-20850
lines changed

.eslintrc.cjs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
require('@rushstack/eslint-patch/modern-module-resolution')
2+
3+
module.exports = {
4+
root: true,
5+
env: {
6+
node: true,
7+
'vue/setup-compiler-macros': true
8+
},
9+
extends: [
10+
'plugin:vue/vue3-recommended',
11+
'eslint:recommended',
12+
'@vue/eslint-config-prettier'
13+
],
14+
rules: {
15+
'vue/html-closing-bracket-newline': [
16+
'error',
17+
{
18+
singleline: 'never',
19+
multiline: 'never'
20+
}
21+
],
22+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
23+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
24+
'prettier/prettier': 'off' // eslint-plugin-prettierの部分だけoffにする
25+
}
26+
}

.eslintrc.js

-22
This file was deleted.

.prettierrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module.exports = {
22
singleQuote: true,
3+
semi: false,
4+
trailingComma: 'none'
35
}

.vscode/extensions.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"editorconfig.editorconfig",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode",
6+
"johnsoncodehk.vscode-typescript-vue-plugin",
7+
"johnsoncodehk.volar"
8+
]
9+
}

.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"editor.codeActionsOnSave": {
33
"source.fixAll.eslint": true
4-
}
4+
},
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"editor.formatOnSave": true,
7+
"editor.formatOnSaveMode": "modifications"
58
}

babel.config.js

-3
This file was deleted.

public/index.html renamed to index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
7+
<link rel="icon" href="/favicon.ico">
88
<title>handson-vue3-examples</title>
99
</head>
1010
<body>
1111
<noscript>
1212
<strong>We're sorry but handson-vue3-examples doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1313
</noscript>
1414
<div id="app"></div>
15-
<!-- built files will be auto injected -->
15+
<script type="module" src="/src/main.js"></script>
1616
</body>
1717
</html>

0 commit comments

Comments
 (0)