Skip to content

Commit

Permalink
chore: update project config and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
SharerMax committed Oct 28, 2024
1 parent b953ab1 commit afea55c
Show file tree
Hide file tree
Showing 11 changed files with 885 additions and 644 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions eslint.config.js

This file was deleted.

17 changes: 17 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import process from 'node:process'
import antfu from '@antfu/eslint-config'

export default antfu({
vue: {
overrides: {
'vue/block-order': ['error', {
order: ['template', 'script', 'style'],
}],
},
},
}, {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
},
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"vue-router": "^4.4.5"
},
"devDependencies": {
"@antfu/eslint-config": "^2.27.3",
"@antfu/eslint-config": "^3.8.0",
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.17.1",
"@unocss/transformer-variant-group": "^0.63.6",
Expand Down
1,423 changes: 824 additions & 599 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHistory } from 'vue-router'

const DefaultLayout = () => import('../layout/Index.vue')
const Index = () => import('../page/Index.vue')
Expand Down
22 changes: 22 additions & 0 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": ["@vue/tsconfig/tsconfig.dom.json"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"moduleDetection": "force",
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
},
/* Linting */
"strict": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmit": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
}
18 changes: 9 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// https://github.com/microsoft/TypeScript/issues/49844
// https://vuejs.org/guide/typescript/overview.html#configuring-tsconfig-json
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
},
"references": [{ "path": "./tsconfig.node.json" }],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
],
"files": []
}
18 changes: 9 additions & 9 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"extends": [
"@tsconfig/node20/tsconfig.json",
"@vue/tsconfig/tsconfig.json"
],
"extends": ["@tsconfig/node20/tsconfig.json"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "bundler",
"types": ["node"],
// https://github.com/microsoft/TypeScript/issues/49844
// emitDeclarationOnly true, noEmit true
"emitDeclarationOnly": true,
"noEmit": false
"strict": true,
"noEmit": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": ["vite.config.ts"]
"include": ["./*"]
}
2 changes: 1 addition & 1 deletion uno.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, presetUno } from 'unocss'
import transformerVariantGroup from '@unocss/transformer-variant-group'
import { defineConfig, presetUno } from 'unocss'

export default defineConfig({
presets: [presetUno()],
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'node:path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Unocss from 'unocss/vite'
import { defineConfig } from 'vite'

// https://vitejs.dev/config/
export default defineConfig({
Expand Down

0 comments on commit afea55c

Please sign in to comment.