保存进度!

This commit is contained in:
2025-08-07 13:22:32 +08:00
parent 9e05314836
commit 614ab49a5e
8 changed files with 2409 additions and 49 deletions

View File

@@ -0,0 +1,208 @@
/*
* @Author: Kane
* @Date: 2023-03-14 09:19:21
* @LastEditors: Kane
* @FilePath: /task_schedule/.eslintrc.cjs
* @Description: eslint 配置文件
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
module.exports = {
root: true,
env: { // 需要在env中指定运行的环境这些环境其实就是一组预定义的全局变量让 ESLint 知道当前环境存在这些全局变量
node: true,
browser: true,
es2021: true,
},
parser:"espree",
parserOptions:{
sourceType: "module",
ecmaVersion: 2021,
},
extends:["eslint:recommended",],
rules:{
indent: ["warn", 4,],
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-unused-vars": "warn",
semi: ["error", "always",], // 控制行尾部分号
quotes: ["error", "double",],
"comma-dangle": ["error", {
arrays: "always",
objects: "always",
imports: "never",
exports: "never",
functions: "never",
},], // 数组和对象键值对最后一个逗号
"comma-style": ["error", "last",], // 逗号在行位
"no-undef-init": "error",
"no-invalid-this": "error",
"no-use-before-define": "error",
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作比如NaN、Infinity、undefined、eval、arguments等
"comma-spacing": ["error", { before: false, after: true, },],
"array-bracket-spacing": ["error", "never", {
singleValue: false,
objectsInArrays: false,
arraysInArrays: false,
},],
"brace-style": ["error", "allman", { allowSingleLine: true, },],
"prefer-const": "warn",
"space-before-function-paren": ["error", {
anonymous: "always",
named: "never",
asyncArrow: "always",
},],
},
overrides: [
{
files: ["*.vue",],
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
parser: { // <script>标签中的lang属性配置不同的parser
ts: "@typescript-eslint/parser",
js: "espree",
"<template>": "espree",
},
// project: "tsconfig.json",
project: ["tsconfig.json", "tsconfig.app.json",],
extraFileExtensions: [".vue",],
},
plugins: ["eslint-plugin-vue", "@stylistic",],
extends: [
// "plugin:vue/vue3-essential",
"plugin:vue/recommended",
"eslint:recommended",
// "standard-with-typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
indent: ["warn", 4,],
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-unused-vars": "warn",
"semi-spacing": ["error", {"before": false, "after": true,},], // 控制行尾部分号
"quotes": ["error", "double",],
"comma-dangle": ["error", {
arrays: "always",
objects: "always",
imports: "never",
exports: "never",
functions: "never",
},], // 数组和对象键值对最后一个逗号
"comma-style": ["error", "last",], // 逗号在行位
"no-undef-init": "error",
"no-invalid-this": "error",
"no-use-before-define": "error",
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作比如NaN、Infinity、undefined、eval、arguments等
"brace-style": ["error", "allman", { allowSingleLine: true, },],
"prefer-const": "warn",
"space-before-function-paren": ["error", {
anonymous: "always",
named: "never",
asyncArrow: "always",
},],
// vue
"vue/html-indent": ["error", 4,],
// typescript
// "@typescript-eslint/indent": ["warn", 4,],
"@stylistic/indent": ["warn", 4,],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/member-delimiter-style": "off",
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
"@stylistic/comma-dangle": ["error", {
arrays: "always",
objects: "always",
imports: "never",
exports: "never",
functions: "never",
},], // 数组和对象键值对最后一个逗号
"@stylistic/quotes": ["error", "double",],
"@typescript-eslint/space-before-function-paren": "off",
// 方括号的空格问题
"comma-spacing": ["error", { before: false, after: true, },],
"@typescript-eslint/comma-spacing": ["off", { before: false, after: true, },], // 使用eslint的不用ts的
"array-bracket-spacing": ["error", "never", {
singleValue: false,
objectsInArrays: false,
arraysInArrays: false,
},],
},
},
{
files: ["*.ts",],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
// project: ["tsconfig.json", "tsconfig.app.json",],
},
plugins: ["@typescript-eslint", "@stylistic",],
extends: [
"eslint:recommended",
// "standard-with-typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "warn",
// "@typescript-eslint/indent": ["error", 4,],
"@stylistic/indent": ["warn", 4,],
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/member-delimiter-style": "off",
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
// "@typescript-eslint/brace-style": ["error", "allman", { allowSingleLine: true, },],
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
"@stylistic/comma-dangle": ["error", {
arrays: "always",
objects: "always",
imports: "never",
exports: "never",
functions: "never",
},], // 数组和对象键值对最后一个逗号
"@stylistic/quotes": ["error", "double",],
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/strict-boolean-expressions": ["error", {
allowString: false,
},],
"comma-style": ["error", "last",], // 逗号在行位
"comma-spacing": ["error", { before: false, after: true, },],
"@typescript-eslint/comma-spacing": ["off", { before: false, after: true, },], // 使用eslint的不用ts的
"array-bracket-spacing": ["error", "never", {
singleValue: false,
objectsInArrays: false,
arraysInArrays: false,
},],
"no-undef-init": "error",
"no-invalid-this": "error",
"no-use-before-define": "error",
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作比如NaN、Infinity、undefined、eval、arguments等
"prefer-const": "warn",
"spaced-comment": "error",
"space-before-function-paren": "off",
"semi-spacing": ["error", {"before": false, "after": true,},],
},
},
],
};

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<title>规章制度管理</title>
</head>
<body>
<div id="app"></div>

File diff suppressed because it is too large Load Diff

View File

@@ -12,10 +12,17 @@
"vue": "^3.5.17"
},
"devDependencies": {
"@stylistic/eslint-plugin": "^5.2.2",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.39.0",
"@vitejs/plugin-vue": "^6.0.0",
"@vue/tsconfig": "^0.7.0",
"element-plus": "^2.10.5",
"eslint": "^9.32.0",
"eslint-plugin-vue": "^10.4.0",
"typescript": "~5.8.3",
"vite": "^7.0.4",
"vue-eslint-parser": "^10.2.0",
"vue-tsc": "^2.2.12"
}
}

View File

@@ -1,19 +1,31 @@
<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<div>
<a href="https://vite.dev" target="_blank">
<img src="/vite.svg" class="logo" alt="Vite logo" />
<a
href="https://vite.dev"
target="_blank"
>
<img
src="/vite.svg"
class="logo"
alt="Vite logo"
>
</a>
<a href="https://vuejs.org/" target="_blank">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
<a
href="https://vuejs.org/"
target="_blank"
>
<img
src="./assets/vue.svg"
class="logo vue"
alt="Vue logo"
>
</a>
</div>
<HelloWorld msg="Vite + Vue" />
<HelloWorld msg="Vite ++++ Vue" />
</template>
<script setup lang="ts">
import HelloWorld from "./components/HelloWorld.vue";
</script>
<style scoped>
.logo {
height: 6em;
@@ -21,9 +33,11 @@ import HelloWorld from './components/HelloWorld.vue'
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #42b883aa);
}

View File

@@ -1,16 +1,21 @@
<script setup lang="ts">
import { ref } from 'vue'
import { ref } from "vue";
defineProps<{ msg: string }>()
defineProps<{ msg: string }>();
const count = ref(0)
const count = ref( 0 );
</script>
<template>
<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
@@ -19,19 +24,21 @@ 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>
Learn more about IDE Support for Vue in the
<a
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
target="_blank"
>Vue Docs Scaling up Guide</a
>.
>Vue Docs Scaling up Guide</a>.
</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>

View File

@@ -1,5 +1,15 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// eslint-disable-next-line
import { createApp, VueElement } from "vue";
import "./style.css";
import App from "./App.vue";
createApp(App).mount('#app')
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// eslint-disable-next-line
const app = createApp( App );
app.use( ElementPlus );
// eslint-disable-next-line
createApp( App ).mount( "#app" );

View File

@@ -1,7 +1,60 @@
// {
// "files": [],
// "references": [
// {
// "path": "./tsconfig.node.json"
// },
// {
// "path": "./tsconfig.app.json"
// }
// ],
// }
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"strictNullChecks": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": false,
"isolatedModules": true,
"baseUrl": "./", // paths 路径解析起点
"paths": { // 别名路径设置
"@/*": [
"./src/*"
],
},
"lib": [
"ES2015",
"DOM"
],
"types": [
"vite/client"
]
},
"include": [
"src/*.vue",
"src/**/*",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"*.d.ts",
"src/router/index.d.ts",
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*",
"eslint.config.*"
],
// "extends": "@tsconfig/node22/tsconfig.json",
"exclude": [
"./node_modules",
]
}