Skip to content

Commit

Permalink
feat: update to latest vue install defaults (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider authored Nov 16, 2024
1 parent b75e547 commit d44e563
Show file tree
Hide file tree
Showing 24 changed files with 148 additions and 225 deletions.
10 changes: 0 additions & 10 deletions template/javascript/base/_eslintrc.js

This file was deleted.

23 changes: 23 additions & 0 deletions template/javascript/base/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{js,mjs,jsx,vue}'],
},

{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
},

js.configs.recommended,
...pluginVue.configs['flat/recommended'],

{
rules: {
'vue/multi-word-component-names': 'off',
},
}
]
11 changes: 4 additions & 7 deletions template/javascript/base/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"scripts": {
"lint": "eslint . --fix --ignore-path .gitignore"
},
"dependencies": {
"core-js": "^3.37.1"
"lint": "eslint . --fix"
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"@eslint/js": "^9.14.0",
"eslint": "^9.14.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.4.0",
"eslint-plugin-vue": "^9.27.0",
"eslint-plugin-vue": "^9.30.0",
"vue-router": "^4.4.0",
"unplugin-vue-router": "^0.10.0"
}
Expand Down
23 changes: 10 additions & 13 deletions template/javascript/default/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Vuetify 3</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>

<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Vuetify 3</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions template/javascript/default/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"private": true,
"type": "module",
"version": "0.0.0",
"scripts": {
"dev": "vite",
Expand Down
19 changes: 0 additions & 19 deletions template/javascript/essentials/_eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion template/javascript/essentials/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"devDependencies": {
"eslint-config-vuetify": "^1.0.0",
"pinia" : "^2.1.7",
"unplugin-auto-import": "^0.17.6",
"vite-plugin-vue-layouts": "^0.11.0"
Expand Down
20 changes: 0 additions & 20 deletions template/typescript/base/_eslintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions template/typescript/base/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="vite/client" />
/// <reference types="unplugin-vue-router/client" />
36 changes: 36 additions & 0 deletions template/typescript/base/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* .eslint.js
*
* ESLint configuration file.
*/

import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},

{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
},

...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),

{
rules: {
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true,
},
],
'vue/multi-word-component-names': 'off',
}
}
]
14 changes: 5 additions & 9 deletions template/typescript/base/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
"scripts": {
"lint": "eslint . --fix --ignore-path .gitignore"
"lint": "eslint . --fix"
},
"dependencies": {
"core-js": "^3.37.1"
},
"devDependencies": {
"@vue/eslint-config-typescript": "^13.0.0",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.4.0",
"eslint-plugin-vue": "^9.27.0",
"@eslint/js": "^9.14.0",
"@vue/eslint-config-typescript": "^14.1.3",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^9.30.0",
"vue-router": "^4.4.0",
"unplugin-vue-router": "^0.10.0"
}
Expand Down
32 changes: 0 additions & 32 deletions template/typescript/base/tsconfig.json

This file was deleted.

7 changes: 4 additions & 3 deletions template/typescript/default/_editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
charset = utf-8
indent_size = 2
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions template/typescript/default/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
17 changes: 7 additions & 10 deletions template/typescript/default/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Vuetify 3</title>
</head>

<body>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</body>
</html>
23 changes: 15 additions & 8 deletions template/typescript/default/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"private": true,
"type": "module",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force"
},
"dependencies": {
"@mdi/font": "7.4.47",
Expand All @@ -12,16 +16,19 @@
"vuetify": "^3.6.14"
},
"devDependencies": {
"@babel/types": "^7.24.7",
"@types/node": "^20.14.10",
"@vitejs/plugin-vue": "^5.0.5",
"@tsconfig/node22": "^22.0.0",
"@types/node": "^22.9.0",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/eslint-config-typescript": "^14.1.3",
"@vue/tsconfig": "^0.5.1",
"npm-run-all2": "^7.0.1",
"sass": "1.77.8",
"sass-embedded": "^1.77.8",
"typescript": "^5.4.2",
"typescript": "~5.6.3",
"unplugin-fonts": "^1.1.1",
"unplugin-vue-components": "^0.27.2",
"vite-plugin-vuetify": "^2.0.3",
"vite": "^5.4.0",
"vue-tsc": "^2.0.26"
"vite": "^5.4.10",
"vue-tsc": "^2.1.10"
}
}
7 changes: 0 additions & 7 deletions template/typescript/default/src/vite-env.d.ts

This file was deleted.

14 changes: 14 additions & 0 deletions template/typescript/default/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",

"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
36 changes: 8 additions & 28 deletions template/typescript/default/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "bundler",
"paths": {
"@/*": ["src/*"]
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
"resolveJsonModule": true,
"types": [
"vite/client"
],
"allowJs": true,
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": [
"src/**/*",
"src/**/*.vue"
],
"exclude": ["dist", "node_modules", "cypress"],
"references": [{ "path": "./tsconfig.node.json" }],
{
"path": "./tsconfig.app.json"
}
]
}
Loading

0 comments on commit d44e563

Please sign in to comment.